GOT IT!!!!!!!!!
S.Y.M. Wong-A-Ton - if I can make a suggestion
In your document tutorial, a second or third screen shot for steps 13 and
14
woudl be helpful for others.
Thanks for all your help.
:
I have continued to work diligently on this and think I am getting
close
My rule now says @Inventory = @Inventory[@ItemNumber = current()]
The field @Inventory gets populated but instead of returning the number
from
tblpromoitems it is returning a "false" value.
Am I close?
:
Let me try to provide a little more detail. I wish screen shots
could be
posted here.
My repeating table is bound to
/dfs:myFields/dfs:dataFields/d:tblPromoItemsordered. I display
ItemNumber,
Description, WebSite, Telephone, Quantity and Inventory. This is my
Main
Connection.
I changed Description to a Drop Down and pull data from a secondary
datasource with these properties
/dfs:myFields/dfs:dataFields/d:tblPromoItems (secondary connection)
where the
value is @ItemNumber and the display is @description.
This all works well and the drop down displays the values of
decription from
tblpromoitems.
Now I want to populate the remaining fields in that row that come
from the
row in the table tblpromoitems. I will use Inventory as an example.
On the Description field I set a rule that says for Conditon - If
ItemNumber (main connection) = ItemNumber (secondary connection), I
set a
fields value. The field is
@inventory (main connection) and I set the value to
@Inventory[@Inventory=current()] where the first @inventory is from
tblpromoitemsordered (main connection) and the second @inventory is
from
tblpromoitems (secondary connection). I also tried
@Inventory[@Description=current()] and
@Inventory[@ItemNumber=current()]
Nothing ever populates in Inventory.
I hope this give you some more detail to provide advice.
Thanks again
:
Your XPath expression is incorrect; that is what the error means.
What field
are you using as the value for your dropdown? That is the field you
need to
set equal to current().
Finding the correct XPath expression can be a challenge. Without
knowing the
structure of the XML produced by the drop-down, it is virtually
impossible to
tell you what the correct expression should be.
Basically, you need to find the correct XPath to the ID field in
the
dropdown and set this equal to current().
---
S.Y.M. Wong-A-Ton
:
I poked around some more and here is something I found that I
thought I
understood.
I followed the tutorial at
http://infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85
and got lost at this point:
The tutorial says to append to the XSL statement to make it look
like this
xdXDocument:GetDOM("Clients")/ClientInfo/Clients/Client/Name[../ID
=
current()]
Mine looks like this to begin with
xdXDocument:GetDOM
"tblPromoItems")/dfs:myFields/dfs:dataFields/d:tblPromoItems/@Inventory
I tried appending [../@inventory = current()]
but always get errors on does not point to a valid location path
of a field
or group.
What am I not undertanding?
:
Yes, the article uses a repeating table. And current() is used
when using a
repeating table.
---
S.Y.M. Wong-A-Ton
:
I will give it a try but I am trying to do in a repeating
table so I hope the
same theory applies
:
Art, check out the section "Automatically display the
player's number and
position" in this article
http://enterprise-solutions.swits.n...-dropdown-list-repeating-table&c=infopath2003
You need to do something similar using the current()
function.
---
S.Y.M. Wong-A-Ton
:
I am writing this in the hopes that someone here comes up
with answer before
I figure this out.
Two data sources -
Main Connection is a table with fields A1, A2 and A3
Secondary Data Connection - S1,S2, S3
I created a repeating table to display A1, A2 and A3. I
changed A1 to a
drop down box and populated the drop down by binding it
to the Secondary Data
Connection. Therefore the drop down displays the data
elements in S1.
What I am trying to accomplish is when a selection is
made in the drop down
A1, A2 and A3 get populated with the data from S2 and S3.
Everything I have tried populates A2 and A3 with just the
first row of the
Secondary Data Source and does not change based on the
drop down selection.
Can someone point me in the right direction?
Thanks