Multi-Select Picklists in FSL Mobile App Flows
FSL Mobile App Flows provide a seamless way to create dynamic and interactive processes for field service tasks. While adding multi-select picklist values in screen flows is straightforward, the real challenge lies in handling and processing these values effectively within the FSL mobile environment.
In FSL mobile apps, using formula fields for multi-select picklists has limitations, making it challenging to promptly extract selected values. This hinders the real-time monitoring and retrieval of results after task completion.
Let's build a flow to show all the Work Order Line Item (WOLI) related to Work Order
- Create a Field Service Mobile flow
Add a screen for a multi-select picklist/checkbox group
To concatenate relevant fields for a meaningful display of WOLI, create a formula field named
WOLI__c
on Work order line item object with the formula expression:LineItemNumber &'-'& WorkType.Name &'-'& Text(Status)
For FSL Flow, use a Record Choice to present records, and ensure a designated 'Id' variable captures the record ID for executing subsequent flow actions.
-
Assign Selected WOLI Ids
Create 2 variables:
vSelectedWOLIIds -To store hold selected WOLI ids in text format
vWOLIIDList - To Store List of selected Ids
-
Verify whether a single item is chosen from the multi-select picklist.
If vSelectedWOLIIds contains ';' means there are more than one item selected
Assign the single item to the 'vWOLIIDList' if applicable.
If there are multiple items, continuously extract each one from 'vSelectedWOLIIds' and append them to the 'vWOLIIDList'
Utilize a formula to extract the first item and store its value in 'f_GetFirstItem'
LEFT({!vSelectedWOLIIds}, FIND(";",{!vSelectedWOLIIds})-1)
Remove the added ID from the original string variable 'vSelectedWOLIIds'
Utilize a formula to remove the first item and store its value in 'f_removeFirstItem'
RIGHT({!vSelectedWOLIIds}, LEN({!vSelectedWOLIIds})- FIND(";",{!vSelectedWOLIIds}))
Connect the line to step 3, ensuring the logic continues until 'vSelectedWOLIIds' has no ';' and exits the loop. Subsequently, utilize 'vWOLIIdList' for the desired operation.
The flow structure should resemble the following:
Execution of the flow:
Sukanya Banekar
Subscribe to my newsletter
Read articles from KarminTech directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by