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 / August 2005

Tip: Looking for answers? Try searching our database.

Comparing Fields with another field in Data validation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tshelar - 05 Aug 2005 00:51 GMT
Hi Guys,
I have Repeate Table section Called Properties and it has mulitple Property
fields in it. How can I compare one field to another for Data validation.
Example: Property A (field) with Property B(field).
Any tips. So far I have tried every thing in the Data validation dialog box
including XPath expression, but nothing has worked.
Greg Collins [InfoPath MVP] - 05 Aug 2005 01:01 GMT
Are the fields within the same row of the repeating table? Or are you trying to compare fields from different rows?

If they are on the same row it should be straight forward. If they are on different rows, that can be very complex depending on what you want to do.

Signature

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

Hi Guys,
I have Repeate Table section Called Properties and it has mulitple Property
fields in it. How can I compare one field to another for Data validation.
Example: Property A (field) with Property B(field).
Any tips. So far I have tried every thing in the Data validation dialog box
including XPath expression, but nothing has worked.
Tshelar - 05 Aug 2005 03:36 GMT
Hi Greg,
The fields are in different rows.

Here is what I am trying to do. The repeating table gets the data(rows) from
a group called "property". So for example If I represent them as Xpath
expression they are as follows.

../sox:Property["PropertyA"]/@value
../sox:Property["PropertyB"]/@value  

(@Value is the attribute)

PropertyA and PopertyB are in separate rows. I want to put a data validation
on the text box that is bounded to PropertyB where I need to compare the
value(@value) of PropertyA with PropertyB.

Thanks for the prompt reply.
Tushar  

> Are the fields within the same row of the repeating table? Or are you trying to compare fields from different rows?
>
[quoted text clipped - 6 lines]
> Any tips. So far I have tried every thing in the Data validation dialog box
> including XPath expression, but nothing has worked.
Greg Collins [InfoPath MVP] - 05 Aug 2005 21:50 GMT
Your XPaths are invalid. XPath doesn't support syntax such as sox:Property["PropertyA"]

I'm assuming the node sox:Property holds a value and that value is "PropertyA". Property also has an attribute named "value".

If this is the case, then you would use something like:

sox:Property[. = "PropertyA"]/@value

What this is saying is: Find the node named sox:Property whose value is "PropertyA" and get its attribute named value.

Signature

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

Hi Greg,
The fields are in different rows.

Here is what I am trying to do. The repeating table gets the data(rows) from
a group called "property". So for example If I represent them as Xpath
expression they are as follows.

../sox:Property["PropertyA"]/@value
../sox:Property["PropertyB"]/@value  

(@Value is the attribute)

PropertyA and PopertyB are in separate rows. I want to put a data validation
on the text box that is bounded to PropertyB where I need to compare the
value(@value) of PropertyA with PropertyB.

Thanks for the prompt reply.
Tushar  

"Greg Collins [InfoPath MVP]" wrote:

> Are the fields within the same row of the repeating table? Or are you trying to compare fields from different rows?
>
> If they are on the same row it should be straight forward. If they are on different rows, that can be very complex depending on what you want to do.
Tshelar - 06 Aug 2005 14:32 GMT
Thanks a lot Greg. As you said the Xpath was invalid. I changed the Xpath to
sox:Property[@name = "PropertyA"]/@value and it works like a charm. The
Property node has attributes "name" and "value".
I appreciate your help.

> Your XPaths are invalid. XPath doesn't support syntax such as sox:Property["PropertyA"]
>
[quoted text clipped - 30 lines]
> >
> > If they are on the same row it should be straight forward. If they are on different rows, that can be very complex depending on what you want to do.
 
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.