multiple values columns in a text box

N

Nick Monsour

Is it possible to have a form with a text box that lists 2 sql database
columns? I have a form that is used to add departments to the
department list. Departments are identified by mane and dept num. I
want to show the existing departments and their numbers and then allow
users to add new names and department numbers. Adding is easy but
showing the departments and numbers that exist is a problem since they
must be shown in tandem to avoid someone adding a new department with a
number that already exists and vice versa.

Thanks,

Nick
 
P

Patrick Halstead [InfoPath MVP]

Not sure I understand, but can't you just use an expression box and string
concatenation for the 2 fields?
 
N

Nick Monsour

I tried that but I am not familliar with the functionality of the
expression boxes.
it looks like this:
db clomuns:
COL1 COL2
DEPARTMENT_NAME DEPT_NUM
administration 100
accounting 110
etc.

And I need to show a look up (read only) of the
department_namedepartment_num in a field presented like this:
administration100
accounting110
etc.
If this is possible in an expression book great but how?

Thanks,
Nick
 
N

Nick Monsour

Is it possible to filter on the expression box? Since in the look up I
want to show what department and department numbers exist for a company
currently.
 
N

Nick Monsour

Ok I see where to filter but I cant seem to get anything to show. What
do you mean by namespaces? Sorry for the stupid questions it just
comes natural.
 
N

Nick Monsour

Ok Greg,

I have tried to get this to work by following the description in the
help file and what you said and all I get is a blank space or an reeor
that tells me the 'd' doesn't work: "d../@department_name" does not
point to a valid location path of a field or group.
My structure looks like:
myFields
queryFields
dataFields
d:hr_dept
dept_id
department_name
department_num
etc.
So I assume that the namespace is the 'd' And when I use the Fx button
and go to the insert formula with concat and put the fields in they
look like this: concat(@department_name, @department_num).
So what am I doing wrong?
 
N

Nick Monsour

Good morning Greg,

I hope you had a good holiday.
So I am back to work on this and it still doesn't work. When I check
the box to reveal the full Path all I see that is inserted is ../ in
front of @department_name. Here is a copy of the
statement-{concat(../@department_name, ../@department_id)} and when I
uncheck that box it looks like {concat(@department_name,
@department_id)}. Where do I find the namespace? What am I doing wrong?
I have no idea why this isn't working.
Thanks
Nick
 

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