Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
aetingu12
Creator
Creator

Expression vs Scripting

All, I am trying to copy and expression I have within one of my created fields:

=if(MATCH(FRUIT,'APPLE') AND MATCH(SEASON, 'SUMMER') AND NOT MATCH(RAIN, 'NO') AND MATCH(LOCATION,'UK'), Dual('LC',1),0)

This within a Field Expression works perfectly.  Creates a Field that has LC and Other and when select LC, I can see all the filters. ie. FRUIT is APPLE, SEASON is SUMMER etc.

But when I move this expression in to a load script to create a column.  The filtration does not work.

Any help is much appreciated,

Aksel

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

So, essentially you are looking for the values within FRUIT and LOCATION to be selected when you click on the SEASON list box? You can do this using triggers, but one thing to note here is that when you select within Testing, the possible values are the same values which are selected when you select in SEASON (calculated list box). It means that you should still be able to see the result for only those FRUIT and LOCATION which are possible when you select Testing.

View solution in original post

4 Replies
sunny_talwar

Would you be able to share a sample where we can see the issue?

Claudiu_Anghelescu
Specialist
Specialist

You can try this:

=if(FRUIT ='APPLE' AND SEASON= 'SUMMER' AND RAIN <> 'NO' AND LOCATION ='UK',
1,0) as LC
To help community find solutions, please don't forget to mark as correct.
aetingu12
Creator
Creator
Author

Hi Sunny,
Thanks for getting back to me. I have added a testing file. There you will see the Season (new column) as expression and the Testing which is the same expression through scripting. the column I have created through scripting doesn't' seem to work
sunny_talwar

So, essentially you are looking for the values within FRUIT and LOCATION to be selected when you click on the SEASON list box? You can do this using triggers, but one thing to note here is that when you select within Testing, the possible values are the same values which are selected when you select in SEASON (calculated list box). It means that you should still be able to see the result for only those FRUIT and LOCATION which are possible when you select Testing.