Question

Custom field with IFS statement in Apps 8

  • 18 November 2022
  • 1 reply
  • 41 views

Userlevel 4
Badge +9

Hi

Is it possible to create a custom field that looks up the param_id field in Variable Data and populates with another value. I can create what I am after in Excel using this IFS statement IF(param_id = "A050-H","103"), but how would I write that in sql for a custom field in IFS?

Thanks,

Hayley


1 reply

Userlevel 4
Badge +10

Think what you are after is a CASE statement

SELECT CASE WHEN ‘Value’ = ‘Condition’ THEN ‘Outcome’ END

FROM VIEW

 

e.g.

SELECT CASE WHEN param_id = ‘A050-H’ THEN ‘103’ END

FROM CUSTOMER

 

You can extend a case statement with multiple conditions. Also escape it with ‘ELSE’ 

CASE

WHEN… THEN ..

WHEN... THEN ..

ELSE …

END

Reply