Hi @Spawn10,
Your approach was "kind of right" but it seems capturing user who is making the choice and retrieving them need to store the captured user name properly for the submitter name. I am rephrasing the core requirement and let's attack with step by step solution:
The Requirement:
Initially, the user name field should be blank. When the user selects from the dropdown, their name should be captured and saved. Later, when viewing the record, the user name field should show the name of the user who submitted the entry, not the current logged-in user.
The Steps to solve:
1. Form's OnVisible property or screen's OnVisible property, initialize a context variable to blank:
2. On Dropdown Selection, capture user name: OnChange property, set the context variable to the current user's full name:
UpdateContext({ varMyUser: User().FullName })
3. Set the Default Property of Data Card- In the single line of text input control inside the DataCard for user name, set the Default property to:
Note: Replace 'UserName' with the actual name of your Dataverse column that stores the user name.
4. Set the Update Property of the Username DataCard - In the DataCard for the user name field, set the Update property to the Text input control's Text property, e.g., DataCardValueUserName.Text //--This will ensure when the forms reloads ThisItem.UserName will fill the datacard.
5. Submit the Form - When the form is submitted, the user name captured in varMyUser will be saved to the Dataverse column.
The issue you're facing happens probably because your text field's Default property or variable is always showing the current logged-in user, rather than the user who originally submitted the record.
If it helps, like and mark as a solution.