In this article, we will discuss how we can get option set value in Microsoft flow using string map entity.
Let’s say we need to process one import file which will be available in one drive for business and we want to get option set value of relationship type label available in RelationshipType column.
In my earlier article, we discussed how we can use string map entity to get option set label based on it’s value using Web API. We can also use string map entity to get option set value based on its label. We can use the following steps
1. Navigate to Flow from your office 365 or from Dynamics 365 apps menu and click on Create from blank.
2. We will be using One drive for Business trigger- when a file is created, so select one drive for Business and select create file trigger like following
3. Click on the File picker and select root folder, where we will be uploading the file.
4. Now let’s create a variable where we will store returned value. Click on + New Step and select Add an action.
5. Write Variable under the search text field and select Variables. After that select initialize variable action.
6. Let’s name this variable as relationshiptype
7. Now we need to use Get Rows action from Excel, so Click on + New Step and select Add an action. Type Get Rows under text field and select Get Rows action
8. Set Get rows action details like following, here HIMBAP is the name of the table in excel import file.
9. Now add Apply to each to process records from excel file
and configure it like following
10. Click on + New Step and select Add an action. Type Dynamics 365 and select List records action, we need to configure it like following
Here relationship type is name of the column in the excel file.
11. Now finally we can add Apply to each step for List records to parse result and assign the result to our variable like following
Now our flow is ready for the test, when we will upload our excel file to one drive for business our flow will run and we can see output returned like below
Stay tuned for more Dynamics 365 contents !!
Pingback: Get Option Set value based on label in Microsoft Flow - Microsoft Dynamics CRM Community
Thanks for your post. Would you use the same approach when using the Create Record Dynamics Flow connector?
Yes you can use the same approach, it should work fine.