I am attempting to pull data to populate a DataCardValue in an Edit Form from a table that has a primary column (data type: Autonumber) that contains a Team Member No. and a column (Single line of text) that contains a username.
The following function is intending to match the currently logged on user to the username in the table and return the Team Member No from the same row into the DataCardValue field.
Search(Choices([@'Team Skills'].crc3e_TeamMember),User().FullName,"crc3e_teammember")
This function returns the correct value, however not in the manner expected: The correct value appears as the only choice in a dropdown box, which is not selected by default. The field remains blank until the user selects the one and only non-blank option. I'd like to avoid any user actions for this field.
1000 apologies if this is a repeat question, I had a tough time trying to come up with good search criteria to find this in the forum.
First time post.
Please and thank you in advance
The subject heading of your post talks about a Text Input control, but there is nothing in your description or your image which suggests you're actually using one.
You have mentioned you have a Single Line Text column which displays a user name, but your code suggests you're actually using a Choice column populated with User Names.
I would suggest clarifying your description because at present, this post is not making sense to me. If I had to guess:
You have a Dataverse table called "Team Skills".
The Primary Column name ("Team Member No.") is set to AutoNumbner, and there is a Local Choice field called "Team Member".
In your app, you have an Edit Form control. You have added the Choice field into your Form as a DataCard.
What I think you're trying to do
You want to set the embedded ComboBox inside the "Team Member" DataCard to be automatically populated with a specific Choice based on the logged in user's name.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional