Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2004

Tip: Looking for answers? Try searching our database.

multiple values columns in a text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick Monsour - 22 Nov 2004 20:03 GMT
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
Patrick Halstead [InfoPath MVP] - 22 Nov 2004 20:53 GMT
Not sure I understand, but can't you just use an expression box and string
concatenation for the 2 fields?

> 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
[quoted text clipped - 8 lines]
>
> Nick
Nick Monsour - 22 Nov 2004 21:33 GMT
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
Greg Collins [InfoPath MVP] - 23 Nov 2004 02:32 GMT
In the Expression Box, set the XPath to "concat(DEPARTMENT_NAME, DEPT_NUM)". Be sure to also make sure you include any required namespaces.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

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
Nick Monsour - 23 Nov 2004 16:03 GMT
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.
Nick Monsour - 23 Nov 2004 16:17 GMT
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.
Greg Collins [InfoPath MVP] - 23 Nov 2004 16:44 GMT
If you are using the InfoPath UI to fill the values for the concat(), then you should be fine because InfoPath takes care of the namespaces for you.

Namespaces are the sets of letters followed by a colon that appear before the names of your nodes or attributes, such as:

my:NodeName ("my" is the namespace)
s0:Field1 ("s0" is the namespace)

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

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.
Nick Monsour - 23 Nov 2004 18:30 GMT
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?
Greg Collins [InfoPath MVP] - 24 Nov 2004 01:38 GMT
You won't see the namespaces, etc unless you check the box to show the full XPath (at the bottom fo the insert formula dialog box). InfoPath hides those by default to simplify the expression for the user. But you can have it show everything if you want.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

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?
Nick Monsour - 29 Nov 2004 13:49 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.