Hey,
I have an edit form that I'm trying to auto populate with client information if it already exists in the dataverse. For example from my ccc_clients table I'm trying to pull the race value from a single choice column if a SSN matches. Here's the current code for DefaultSelectedItems of a choice column in an edit form:
LookUp(ccc_clients, SSN = ssnInput.Text, Choices(ccc_clients.Race).Value)
This doesn't throw any errors, but it doesn't auto populate the edit form 'Race' input with correct race value for the given SSN. It always populates the form with the first Race choice that was entered when creating the choice column.
I know working with choice columns can be tricky but it shouldn't be this hard.
Solved! Go to Solution.
Hello, @mikerosoft_user, You need to use the Square Brackets in this case:
[LookUp(ccc_clients, SSN = ssnInput.Text, ccc_clients.Race)]
If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more. I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends. Visit my Blog: www.powerplatformplace.com
|
Hello, @mikerosoft_user, You need to use the Square Brackets in this case:
[LookUp(ccc_clients, SSN = ssnInput.Text, ccc_clients.Race)]
If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more. I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends. Visit my Blog: www.powerplatformplace.com
|
Thanks for the response. I'll accept as the correct answer because you put me on the right track. For some reason the version you posted just results in a blank choice input, however if you put the brackets just around 'Race' it works perfectly.
LookUp(ccc_clients, SSN = ssnInput.Text, [Race])
@mikerosoft_user, you right, I didn't pay attention to the returned result Race inside your Lookup. I usually write this formula as below:
[LookUp(ccc_clients, SSN = ssnInput.Text).Race]
User | Count |
---|---|
20 | |
10 | |
9 | |
5 | |
5 |
User | Count |
---|---|
32 | |
30 | |
18 | |
17 | |
7 |