IF Conditional Check

0
Hello, I am working on adding in the conditional check below, but it looks like I get a ‘mismatched input ‘<EOF>’ expecting ELSE’ error message.  if $NewSalesAreas_2/SalesOrg = 'SW01' then 'C' else if $NewSalesAreas_2/SalesOrg = 'SW16' then 'GG' else if $NewSalesAreas_2 = 'SW17' then 'GG' How do I modify the conditional check to resolve this error? Thank you! Isabelle
asked
4 answers
0

Hi Isabelle,

You are missing a trailing else at the end of the statement. If your SaleOrg isn’t in SW01, SW16, or SW17, what should be returned? That will need to be what the else returns.

Hope this helps.

answered
0

Hi Isabelle,

         I think you have missed else statement at the end.(meaning you have not completed if-else statement syntax correctly)

 if $NewSalesAreas_2/SalesOrg = 'SW01' then 'C' else if $NewSalesAreas_2/SalesOrg = 'SW16' then 'GG' else if $NewSalesAreas_2 = 'SW17' then 'GG' else ‘some string’

Add else statement at the end. It will work. Thanks

 

Regards

answered
0

hi isabelle try this 
 if $NewSalesAreas_2/SalesOrg = 'SW01' then 'C' else if $NewSalesAreas_2/SalesOrg = 'SW16' then 'GG' else if $NewSalesAreas_2 = 'SW17' then 'GG' else ‘some string’  

answered
0

Hi Isabelle,

In the current solution you have to change the mendix solution every time the salesorganisation codes change or are added. My suggestion is to add an entity SalesOrg with the string needed. In your edit screen you can add a  a reference selector to the salesorg entity.

 

Regards,

 

Andre

answered