Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
8 years ago
Solved

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.

 

3 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    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.

    • DCat1223's avatar
      DCat1223
      Frequent Contributor

      Thank you Marsh.  I appreciate the help.