1

I am trying to build a reactive flow screen

I have added picklist component (Approval_Options) to the screen. Its choices are Approve_with_Change and Approve_with_Nochange I have also added a user lookup component on the same screen. Based on what users select on the picklist , I want to set the default value of the user lookup field.

I tried to create a formula and use that in default value. But I cant seem to find right way of creating the formula

I have tried things like

 IF({!Approval_Options} = {!Approve_With_Change} ,'user1id','user2id')

Also tried to use ISPICKVAL and TEXT but it gives an error saying 'The formula expression is invalid: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Text' OR 'The formula expression is invalid: Incorrect parameter type for function 'TEXT()'. Expected Number, Date, DateTime, Picklist, received Text'

Is there anything I am missing here ? OR flow builder doesnt allow us to use picklist components on formulas ?

1 Answer 1

1

It is actually working with both IF and CASE.

There was some problem with my Choice Approve_With_Change. I recreated it and formula started working.

Here is my picklist component, lookup component and the formula (just in case anyone is trying to do something similar, it should help them )-

enter image description here

enter image description here

enter image description here

2
  • N.B. you might want to avoid those hard-coded userIds so the flow is self-documenting. Instead, use CMDT for the usernames/federationIds of the two users of interest, then query for those Users using Get Elements
    – cropredy
    Commented Feb 22 at 1:48
  • 1
    @cropredy yes yes of course they will not be hardcoded . This was just for testing . They will be coming from the record that will be passed as an input param to this flow . Commented Feb 22 at 3:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .