Using a Wildcard in a code expression
Hi. I am using an If...Then statement in a keyword test that evaluates a field on the screen.
This field can display any number of things based on how a user answers a series of questions. For example, it may display "Dependent Care Reimbursement: $100", "Dependent Care Reimbursement: $200", Commuter Benefit: $100", "Medical Spending Account: $500"... I think you get the picture.
Using the attached screenshot for reference, I would like to look at Value1 (a mapped field), and verify that it Equals Value 2, which would be "Dependent Care Reimbursement:" plus a wildcard to account for the dollar amount, which will differ as the Data loop iterates.
At this point I'm only concerned with "Dependent Care Reimbursement" and the wild card. If someone can please tell me the proper syntax for using a wildcard in place of the actual dollar amount for now I would really appreciate it.
Thank you in advance!
Solved! Go to Solution.
I would use aqString.Find instead. Just look for "Dependent Care Reimbursement" in the field on the screen. You won't need a wildcard.
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
Another way is to use some regular expression and cmpMatches parameter.
Also you can map your element using wildcard:
And then use yourElement.Exists (or another element's property) in the If..Then statement.
Thank you Marsh. I appreciate the help.