You are very welcome. And it was a pleasure trying to help you. Keep up your
enthusiasm for InfoPath; it is a great MS product!
Regards,
S.Y.M. Wong-A-Ton
:
This was great.
At first, it did not work cause you said to replace the text AFTER the equal
to sign (=) but it was great that you described what I was to replace cause
that text was BEFORE the equal to sign (=) so the textbox field should look
something like the following:
textboxfield = @coulmnB[current() = @ColumnA]
I got it working thanks to you, I really appreciate this. Like I said before
I am new to Infopath, but loving every minute of it.
You are the best! Keep up the good work of helping rookies like me...
Thanks,
Socaprice
:
Hi socaprice,
The more information you can give me, the better I will be able to help you.

I think we can solve your problem... Try the following:
- Open the rule you added on the dropdown
- Click on the [Modify...] button in the Rule dialog box
- Select the action you added previously
- Click on the [Modify...] button
- Click on the "Insert Formula" button next to the "Value:" textbox
- At the bottom of the Insert Formula dialog box, you'll see a checkbox with
the label "Edit XPath (advanced)". Check this checkbox and the full XPath
expression for your formula will appear.
- Replace the text after the equal to sign (=) with the XPath current()
function. The text you would be replacing looks something like
"xdXDocument:get-DOM()/..."
- Uncheck the checkbox "Edit XPath (advanced)". Your formula should now look
something like the following:
textboxfield = @columnB[@columnA = current()]
- Close all dialog boxes by clicking on [OK]
Hope this helps. If you are still having problems getting it to work, let me
know. And if this answered your question, let me know too or better yet, vote
that it was helpful to you, so that others can also benefit from this
solution.
Regards,
S.Y.M. Wong-A-Ton
:
Both the dropdown and the textbox are in the Repeating Table. The form is
supposed to be an Expense form, and for every expense chosen (column A) there
is supposed to be a GL code (column B) that goes with it.
As I make the expense choice it will put the GL code in then I move on and
insert the next item that may have a separate GL code if a different expense
is chosen.
For some reason, it is storing the same GL code (column B) when I move on to
the next item to insert. And when I choose the expense (column A) it is not
erasing the GL code (column B) and replacing it with the new one.
I hope I have not over analysed the problem.
Thanks again for any help you can give me.
:
Do you have both the dropdown AND the textbox in the Repeating Table? Or is
only the textbox in the Repeating Table?
- S.Y.M. Wong A Ton
:
Thanks both work but there is one flaw in the second question, and it is my
fault because I forgot to mention that I am using it in a Repeating Table, so
whenever I insert a new item, the text box displays the data from the first
dropdown.
All the fields are in details of the Repeating Table but it seems to carry
over the data from the first item. It does not allow me to start with a clean
slate once the new item is inserted.
It has to stay in a Repeating Table because I have to add columns in the
table.
Is there any way around that?
Thanks for the help S.Y.M. Wong-A-Ton, I really appreciate it.
:
Hi socaprice,
1. InfoPath displays items according to the settings for the Default View
set on your SharePoint list. So if you want all the items in your list
displayed in the dropdown list on your IP form, increase the maximum amount
of items for the Default View for your list in SharePoint.
- Click on the SharePoint list
- Select "Modify settings and columns"
- Click on the view that has been set as the Default View for the list (this
is the All Items view by default with a max amount of 100 items being
displayed)
- Scroll down until you see "Item Limit"
- Expand the node for "Item Limit"
- Set the "Number of items to display" to the amount of items you want
displayed.
2. Yes, this can be done with rules and filters.
- Add a dropdown and bind it to your SharePoint list. Be sure to include
both columns (A and B) when adding a data connection for your SharePoint list.
- Add a textbox to your form
- Double-click on the dropdown to open its properties dialog
- Click on the [Rules...] button and click on the [Add] button to add a rule
- Click on the [Add Action...] button
- Select "Set a field's value" from the Action dropdown
- Click on the "select a field or group" button next to the "Field:" textbox
- Select the field (from the main DOM) corresponding to the textbox on your
IP form
- Click on [OK]
- Click on the Formula button beside the "Value:" textbox
- In the "Insert Formula" dialog: Click on the [Insert Field or Group...]
button
- Select the data source for your SharePoint list from the Data source
dropdown; it would most likely be a secondary data source
- Expand the tree with the fields in the data source and select the field
you would like to display in the textbox; in your case, column B
- Click on the [Filter Data...] button
- Click on the [Add...] button in the Filter Data dialog box
- Select column A from the first dropdown on the Specify Filter Conditions
dialog box
- Leave "is equal to" selected in the second dropdown
- Select "Select a field or group..." from the third dropdown
- Select the Main DOM from the Data source dropdown in the "Select a Field
or Group" dialog
- Select the field from the Main data source fields that corresponds to the
dropdown on your IP form
- Click on [OK] 9 times to close all dialog boxes.
Hope this helps.
Regards,
S.Y.M. Wong-A-Ton
:
Hi all I am new, both to Infopath and this forum. I am hoping someone can
help me with 2 things.
First I have created a list in SharePoint that contains 2 fields (columns) A
and B the list has more than 200 records in it, my first problem is when I
create a dropdown list on my Infopath form the dropdown list is only showing
the first 100 items in the list. When I go to the SharePoint list I can see
the first 100 items and there is a link at the bottom that allows me to view
the next 200 and so forth. Why can't the dropdown list in the Infopath form
show more than the first 100?
My second issue is that I would like to be able to choose an item from
column A in the dropdown list and let the corresponding item in the same
record from column B be displayed in a text box. Can this be done through the
rules and filters without writing code?
Thanks for any help you can give me.
Socaprice