I am trying to do a Lookup of Dataverse Choices datatype, but it isn't working. I am getting an "Expected Text value" error.
here is my function:
LookUp(TableInfo,ID = "1007").Impact
Impact is a Choices datatype field
Please Help!
Solved! Go to Solution.
Got it, cheers for clarifying. That's a normal error, you'll need to get the text values of the BusinessImpact choices since they're are multiple choices. What you're getting now is the collection. You can use the Concat function to get all the available values into one text. Here's what you expression should look like and an example:
Concat(LookUp(TableInfo,ID = "1007").BusinessImpact, Text(Value), ",")
Hi @PeteSa ,
Sorry, what are you actually trying to do here, I am confused. Do you have a table with a Choices column for Impact and you are trying to filter that table to show only ones with a specific value? Are you trying to get all values that are possible for the Choices of Impact?
If you are displaying in a Form you can just do Choices(Impact) in a ComboBox and it will show you the options to select from.
Sorry, might be stupid question but just not sure what you are trying to do...
Hi Drew,
I am trying to get the Impact field (Choices datatype) from the TableInfo source for a given ID through a Lookup function. I then want to display the value in a text field within a form. The Impact field is only a single select field; so there will only be one value.
Thanks,
Peter
Hello @PeteSa,
Can you please try the same
Consider
Filed Name : StateField
Field Option : Active --> Value = 1007
InActive --> Value = 1008
LookUp(TableInfo,ID = Choices(StateField).Active).Impact
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com
Thanks for your response, but in my example the ID is the row , not the value of a choice.
So , somehow I need the Choices function around Impact or convert Impact to a Text type
Hi @PeteSa,
Are you trying to have the Choices (aka optionsets) items as a data source for a control like in a gallery? If so, like @dpoggemann said, you can use the Choices function. Steps:
1) Add the table that references that choice that you want as data in your canvas app
2) Use the Choice function with the column of from that table in step #1
Here's an exmaple:
Hope this helps!
No, that isn't what I am trying to do either.
I have a label with this function:
Text = LookUp(TableInfo,ID = "1007").ModelName
Everything is fine
Now, I switch the .ModelName field to a Choices field called .BusinessImpact. There is then an error "Expected Text Value", as BusinessImpact is a Choices datatype
Got it, cheers for clarifying. That's a normal error, you'll need to get the text values of the BusinessImpact choices since they're are multiple choices. What you're getting now is the collection. You can use the Concat function to get all the available values into one text. Here's what you expression should look like and an example:
Concat(LookUp(TableInfo,ID = "1007").BusinessImpact, Text(Value), ",")
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
29 | |
23 | |
19 | |
12 | |
11 |