Using a Wildcard in a code expression
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Dave.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would use aqString.Find instead. Just look for "Dependent Care Reimbursement" in the field on the screen. You won't need a wildcard.
https://support.smartbear.com/viewarticle/85729/
Marsha_R
[Community Hero]
____
[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.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Marsh. I appreciate the help.
