Referencing a particular value from a database in a rule/default v

B

Baskafishu

I'm creating a form which uses an access database as a secondary data
connection to receive data. This form is for the purpose of requesting
courses for training (in my organization). All information about these
courses like the course price, description, course number, etc. are in the
table which my form is connected to. Ultimately, upon submission, this form
will be added to a SharePoint doccument library.

I have a repeating table with 3 columns. The first column is a drop-down
list that displays the names of all the courses but contains values of the
course numbers. The second column is a text-box which will contain the number
of seats the particular course is being requested for. I need my 3rd column
to contain the price for that course, for the number of seats entered in
column 2.
Now here's my problem: The base price of all courses is in the database
table and each base price is different. The calculation I requre in the 3rd
column is [BasePrice(of course selected in column 1)*NumberOfSeats]...I could
have the drop-down list display course names and hold values of the
BasePrice, but when the form is submitted I would not be able to know which
courses are selected- I'd just get their base prices. How do I manage to
reference the BasePrice (of the particular course selection in column 1) from
the Access Database table into the form? I tried using the XPath command to
set the fields value to:

/dfs:myFields/dfs:dataFields/d:TableName[@CourseNumber="DropDownFieldInColumn1"]/@BasePrice

However this does not work for some reason. If I put in an exact value for
the 'CourseNumber=' in the above formula I get a valid result but if i just
put a field reference I get an empty string as the result. I need to put in a
reference because the CourseNumber depends on the selection made in the
drop-down list.

I know that this sounds a little confusing but if you dont understand
something I dont mind clarifying it.
 
S

Shiva (GGK Tech)

Hello,

In your XPath you have to change like below,
/dfs:myFields/dfs:dataFields/d:TableName[@CourseNumber="Field
XPath"]/@BasePrice

In the above XPath:
You have to give your filter condition field XPath.

If you want to check this expression value contains correct or not add this
expression in expression box and check it once. If you give your main DOM
schema then we can give exact filter condtion.
 

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