Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

If statement in search string of select in field action

I would like to use an if statement in the search string of a select in field action.  The selection works without the if statement.  Once I try to add the if statement in it no longer works.

The following statement works as is:

=Trim(PurgeChar( SubField(vUSNFDMParts,',',vPartSelNum),chr(39)))

However, I would like to have the selection be conditional so I created the following:

Trim(PurgeChar(

if(Market_Data.Market='US NFDM' ,SubField(vUSNFDMParts,',',vPartSelNum),

if(Market_Data.Market='EU SMP',SubField(vEUSMPParts,',',vPartSelNum),chr(39)))

If I put this in a text box it gives me the correct answer.  If I put this in a search string of a select in field action, it does nothing.  I'm sure the issue is the syntax for the search.  I just don't know what the correct syntax is or if it can be done at all.

2 Replies
MarcoWedel

‌please post sample data/app.

thanks

regards

Marco

sunny_talwar

Can you try this:

=If(Market_Data.Market='US NFDM' , Trim(PurgeChar(SubField(vUSNFDMParts,',', vPartSelNum), Chr(39))),

  If(Market_Data.Market='EU SMP', Trim(PurgeChar(SubField(vEUSMPParts,',' ,vPartSelNum), Chr(39)))))