You need to sign in to do that
Don't have an account?
JGF
Flow - Populate Picklist from values splitted from String var
Hello everyone,
I've a situation where a record has a set of values in a text field received from an integration and this values need to be displayed as a Picklist in a Flow Screen. As this values change for each record I can't make a picklist field.
In the event of being able to split this value into a string of values, I can't seem to be able to create e picklist value set from this values, it will always ask me to choose an existing picklist field for an Object.
Is it possible to create a Picklist Choice Set for the Flow where I set the values it should have?
I don't seem to find any other way to represent that field as a Picklist on a Flow.
I've a situation where a record has a set of values in a text field received from an integration and this values need to be displayed as a Picklist in a Flow Screen. As this values change for each record I can't make a picklist field.
In the event of being able to split this value into a string of values, I can't seem to be able to create e picklist value set from this values, it will always ask me to choose an existing picklist field for an Object.
Is it possible to create a Picklist Choice Set for the Flow where I set the values it should have?
I don't seem to find any other way to represent that field as a Picklist on a Flow.
Thank you very much for the answer. I was just doing something similar but with a LIghtning Web Component as I need to use it in a Flow.
Here is what I did.
1º Create a new LWC
For the XML File:
I create two properties that will be available at the Flow. The first one will allow the component to receive the String with the possible values. The Second one will be where the chosen option will be stored when chosing a value at the Picklist. For the JS File:
With connectedCallback() the component is able to load the received value, split the values with the ';' char and insert each obtained value in the array. The HTML File has an onOnchange event at the picklist that will call assignValue(event) to obtain the chosen value and place it at the output variable.
For the HTML File:
I just put the picklist, taking the values from the array that contains the splitted String value from de JS File. Once the LWC is created, at the Flow I only need to add the component to a Screen piece and tell the variables that will be used:
Hope it helps until we can make this without code.
All Answers
I found a developer thread where in one person implemented a dynamic picklist please find the link below:
>> https://developer.salesforce.com/forums/?id=906F0000000BZxgIAG
I think you would be able to use this for reference to implement your scenario.
In case if this helps please close the thread and also mark this as the best answer so that it can be used by others in the future and alos helps in keeping the community clean.
Regards,
Anutej
Thank you very much for the answer. I was just doing something similar but with a LIghtning Web Component as I need to use it in a Flow.
Here is what I did.
1º Create a new LWC
For the XML File:
I create two properties that will be available at the Flow. The first one will allow the component to receive the String with the possible values. The Second one will be where the chosen option will be stored when chosing a value at the Picklist. For the JS File:
With connectedCallback() the component is able to load the received value, split the values with the ';' char and insert each obtained value in the array. The HTML File has an onOnchange event at the picklist that will call assignValue(event) to obtain the chosen value and place it at the output variable.
For the HTML File:
I just put the picklist, taking the values from the array that contains the splitted String value from de JS File. Once the LWC is created, at the Flow I only need to add the component to a Screen piece and tell the variables that will be used:
Hope it helps until we can make this without code.