Problems with drop down lists and text boxes

H

Hasse

Hi,

I have designed a form with two drop down lists and two text boxes.
Drop down list 1 shows all the suppliers in a SharePoint list.
Drop down list 2 shows the article numbers also collected from a SharePoint
list,
not the same one though, belonging to the supplier choosen in drop down list
1.
When I select an article number in list 2 would like to fill text box 1 with
article number and text box 2 with
article name. The textboxes are inside a repeating table and when I click
Insert Item I get a new row with
article number and name. Now I choose another article number in list 2 and
click Insert Item. My thought
was to add a new article number and name to the text boxes but I get the
same number and name in all boxes.

I hope I have been clear in describing my problem and that someone can help
me.

Best regards,
Hasse
 
S

Scott L. Heim [MSFT]

Hi Hasse,

If I understand correctly, your drop-down boxes display the correct
information but when you select a value from one drop-down box to populate
one of the text boxes in your repeating table, the same value is getting
populated each time - is this correct?

Assuming I have understood correctly, you are going to need to incorporate
a filter that uses the "current()" function so that you set the value based
on the "current row" you are editing in your table.

Here is a link to a blog on this - let us know if you need more information.

http://blogs.msdn.com/infopath/search.aspx?q=current&p=1

I hope this helps!

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
H

Hasse

Hi,

Thanks for taking time and try to help me.
Unfortunately I can't get it to work.
I have a section with two drop down lists and a repeating table with two
text boxes.
My formula looks like this:
"current()/xdXDocument:get-DOM()/my:myFields/my:group39/my:Article"
When I use current()/ I get thiss message:
"Node-test expected.
current()/-->xdXDocument:get-DOM<--()/my:myFields/my:group39/my:Article"
When I use last()/ I get thiss message:
"Node-test expected.
last()/-->xdXDocument:get-DOM<--()/my:myFields/my:group39/my:Article"

I can mail you my .xsn or any other file if you would like to have a look.

Thanks,
Hasse

"Greg Collins [InfoPath MVP]" skrev:
 
H

Hasse

Thanks a lot you guys,

I have now solved this problem.
The code should look like this: @Operation[@ArtOp =
current()/../ArticleNumber]

Regards,
Hans

Greg Collins said:
You cannot combine current(), last() or any other function with xdXDocument:get-DOM().

Without seeing your full schema and form, I can only guess, but you probably want something more like the following:

current()/my:Article

or

my:group39[last()]/my:Article

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



Hi,

Thanks for taking time and try to help me.
Unfortunately I can't get it to work.
I have a section with two drop down lists and a repeating table with two
text boxes.
My formula looks like this:
"current()/xdXDocument:get-DOM()/my:myFields/my:group39/my:Article"
When I use current()/ I get thiss message:
"Node-test expected.
current()/-->xdXDocument:get-DOM<--()/my:myFields/my:group39/my:Article"
When I use last()/ I get thiss message:
"Node-test expected.
last()/-->xdXDocument:get-DOM<--()/my:myFields/my:group39/my:Article"

I can mail you my .xsn or any other file if you would like to have a look.

Thanks,
Hasse

"Greg Collins [InfoPath MVP]" skrev:
Are your drop-down lists boxes ALSO within the repeating table, or outside of it? I'm guessing from what you wrote that they are outside. If so, it kind of sounds like you always want to populate the last row of the repaeating table with the values. If this is the case you can use "last()" to get the last row.

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



Hi,

I have designed a form with two drop down lists and two text boxes.
Drop down list 1 shows all the suppliers in a SharePoint list.
Drop down list 2 shows the article numbers also collected from a SharePoint
list,
not the same one though, belonging to the supplier choosen in drop down list
1.
When I select an article number in list 2 would like to fill text box 1 with
article number and text box 2 with
article name. The textboxes are inside a repeating table and when I click
Insert Item I get a new row with
article number and name. Now I choose another article number in list 2 and
click Insert Item. My thought
was to add a new article number and name to the text boxes but I get the
same number and name in all boxes.

I hope I have been clear in describing my problem and that someone can help
me.

Best regards,
Hasse
 
B

Bromley

This is exactly what i have been trying to accomplish for WEEKS now, and when
attempt to use the "current()" function as a filter i get no value returned.
here is my syntax...

xdXDocument:GetDOM("Customer Issue
List")/dfs:myFields/dfs:dataFields/dfs:Customer_Issue_List/@Headline[../@ID =
current()/dfs:myFields/dfs:dataFields/d:VoteMaster/d:Votes/@IssueID]

Any help would be greatly appreciated!!!
 

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