Automatic filename using count & starts-with functions in IP 2003

D

dawn_at_work

In InfoPath 2003, I am using the count() function on my InfoPath form
(publishes to a SharePoint form Library) that will count how many forms are
in the list and adding one [it looks like this: count(@ID)+1].
The problem is that I want to format the filename with the first letter of
the office chosen in the form (a field in the form--assuming I can use a rule
that if Office=Edmonton the value is ET, etc.) +001. There is a starts-with
function, but I can't get it to work in conjunction with the count function.
Is there a way to make them work...or an easier way to apply the filename so
that it only counts the IDs that start with ET (or which ever applies
depending on the Office field) and then adds 001 when submitting.

Help!
 
S

S.Y.M. Wong-A-Ton

I don't think your question and form template setup are clear enough for
anyone to be able to help you, Dawn. Can you elaborate a bit more how you
constructed your form template and what it looks like? Are you using a
drop-down with Offices? Joining text is easy; you can use concat() for that.
To get the first two letters of a word, you can use substring(). From the
description of your problem, I think that you need to use an XPath filter to
count the IDs, but am not sure that you can count them based on the first two
letters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top