How to get Text from Look-up, Choices & Choice fields in Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to another video this is sanjay prakash and i am the microsoft satisfied trainer and i am giving training in dynamics 365 and power platform in these days so today in this video we will discuss how we can fetch the text value of choice fields text value of lookup fields and text value of other you know other values like having the option sets like boolean values and all that right because normally when you work in a power automatic it returns the value but it not returns the text right so let us work on this let me go to my flow and create a new flow so click on the create and click on this instant flow click on manual trigger flow give your name get text okay now here i want to read the lead records right i want to read a lead let me open a lead so i'll go to powerapps i'll just test for one lead so that you can understand you can work on your other leads okay let me go to apps and open sales hub or i can go to this tables then i can short share lead now this is the lead entity i can go to data section and i want to read a specific lead information right because i want to read some local values and some option sets or choices from that so this is my lead let me edit this record [Music] now let me check for some information that i want to read okay so the first thing is in this lead entity i have some some choice fields like list option sets some lookups and i want to read that right so in this screen you can see this is a lead source right this lead source is option set uh the choice field right you can also have some ratings here you can read also right next i want to read some lookup values if you go to details you can see source campaign is there this is a lookup pointing to another table okay you can also see some more uh multi select options if you want you can also add it here right so this is a multi-select option set our choice choices data type so how can you read this all you know all data types text value not valid not the underlying value right so let us go and test let me copy this id of this lead then go here and i want to use dataverse and in the database i want to use getarrow okay get a row by id i have the id i have copied from all on the url short the entity for leads okay now this step will re read all the sorry it will read all the columns of that lead record right let me rename this step just use my lead okay so this step name is renamed as my lead now i want to see that i want to take some variables okay let me take some variables to read that data so i'll use initialize a variable and in this variable i want to keep this option set advertisement or rating okay to understand the rating you can go here give a name as rating and the type you can see you can give string and value you want to assign rating normally you you do this right i am keeping rating value here so let me change this to rename this to rating next in another so this is a option set or choice value now i want to add another variable here and in this variable i will initialize to store the uh multi-choice value the choices data type right so this is the degree let me check sorry let me choose the degree also here and here it will be let's say object or string and i will assign degree so this is the degree i have assigned so i will rename this for understanding so this is a choices data type right this is choice data type and this is choices data type now i want to read also the lookup field of this source campaign this name i want to read so i can go here and take another variable and in this variable i will initialize let's say campaign and i'll use stream and assign source campaign so the source campaign is the is a source campaign or lead source is the value which stores the uh campaign information right because this is the lead source and it is stored here now once i have added this let me check what are the value it is coming it is getting right so let me give lead source now let me run it now save this first so i have taken three data types rating which is a choice data type degree which is a choices data type lead source which is a lookup data type i want to see what data it is returning okay now if i will run the flow i can check what data is assigned to my variables now if i will open rating you can see it is added to the value is 2 but i don't want to i'm expecting this would be it should be something like advertisement right sorry it should be something reading that means it should be uh warm right and here also in in degree you can see the values are returning i don't want the values i want this here also it is returning some one which is something like id right but i want the campaign information right the name i want this name right so to do that we have to manipulate this data assignments the field assignments right so let me go back and click on edit and change this to identify uh how what data i will change whenever i will ascend to a variable there is a trick go to the back button and click on this last successful run click on this and here when we are reading the uh items reading the leads you have a body injection object copy the body and copy to a notepad okay now once it is copied just check which data you are reading for your data type you are reading rating so go here and search for rating right now there is no rating concept right now why there is no rating because the rating has some different uh name of this field right now go here enable this power up level up click on the logical name but i want to see the logical name of this uh logical name of this field called as uh rating right so click on this logical name now here the logical name is so for this it is something editing logical name is not displaying let me click on this okay if you don't find here you can go to your powerapps to check that right you can go to columns you can short share ratings now this is the rating the name is lead quality code right now you have to search here lead quality code now once i have searched this in this notepad i can see this lead quality code has three tags sorry two tags in the one tag it is displaying the value and another tag it is displaying the text right now this requires some formatted value manipulation right so what i have to do i have to change my flow to have this formatted value i will go here click on edit i will go to my rating here i will click the three dots and click on p code okay in the value i will copy from output to the square bracket okay i'll copy this go to a notepad go to a notepad okay this is my notepad now instead of this lead quality code i want to add some more string i will add at the red o data community dot display dot v1 dot formatted value so i'll add here can you see that instead of lead quality code i am adding this one so i will copy this and i will go to this i'll click on done and delete this and i will go to the expression from the dynamic panel click on the entire formatted value i have done this click on ok now it will be assigned to the value like that i will do for the other things also also so for the degree i will use pic code then i will copy this output and i'll go here so this manipulation is required right so here you have to copy this add the red up to starting from address to last formatted value put it here copy this and go to click on done and delete this assignment and click on the expression put it okay like that do the same thing for campaign because i want the campaign name so so you have to click on this sorry before clicking you have to pick the code right otherwise you cannot identify go to so collapse this go to three dots click on picot copy this output and go to here now add this same thing odata format value copy this you can go here done and instead of directly assigning lead source go to expression and assign this right now i have used formatted value for these three um three variables to ascend that fields text value let us test click on test click manual so click on run now i am expecting all the text values will be returned okay now if i will click on the rating i can see the value is warm right now if i'll go to degree i will have all the selected values not the selected text not the values and here also in the lead source i will have the advertisement so it is the lead source i am having the advertisement as the name because here you can see this is the advertisement is the lead source right if you want to use the campaign also you can go here in the details tab and you have to use this campaign id right for the campaign id you have to use something like this so this is not a lead source this is a campaign id so you have to use like underscore campaign id underscore underscore value right you have to use this because to read the lookup field name you have to use the field id before that you have to use underscore after that you have to use underscore value then at the rate formatted value so copy this i will go here edit this and i will change this to uh because this name is confusible so change this to campaign right and instead of this output i will use my output and this is reading the campaign id click on ok click test test now it will return the name of the campaign field and the name of the campaign field is this one product branding phone personal audio all markets so i'll go here and check this right so this is how you can retrieve the text value of the lookup value lookup field this is how to retrieve the text value of choices data type multi select option and this is to select how this is to select the text of a choice data type which is called as option setting previously so thank you for your time i hope it will help you help you in your development projects i will come with next videos i will come with more videos in next time if you have not subscribed subscribe my channel thank you so much cheers bye
Info
Channel: Softchief Learn
Views: 17,893
Rating: undefined out of 5
Keywords: Dynamics, CRM, Dynamics 365, Power Apps, d365, power platform, dynamics 365 tutorials, dynamics crm training, get text of choice field in power automate, how to get text from lookup field in power automate, get text of lookup and choice fields in flow
Id: bJlaAYx-AmE
Channel Id: undefined
Length: 15min 17sec (917 seconds)
Published: Wed Jul 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.