How to load the default value for Control text on the Form from another SharePoint list every time the form is opened.
I create a travel Request form (DataSource: SharePoint lists:TravelRequestLog) with textbox Travel Phone Number (txtUserPhone). I want the default value of txtUserPhone to be loaded automatically from the PhoneNumber column in the word DataSource: SharePoint lists: UserDefaultInfo. How to set like that?
Really appreciate your help and Kudos for the advice.
Hi @Rspv the entire thing in [] please defaultselected of combobox expects you to give your value in table format
@Rspv please place the formula within your Square Braces []
@Muzammil_069506 @@ Thank you for your advice. It works well
I did the same for combobox by set defaultSelectedItems = Lookup(UserDefaultInfo, Email = User().Email).Location (location is Choice type)
But it didn't work. Could you please help?
Hi @Rspv
Here's how you can set a default value that updates every time your form loads from a different list:
1. **Unlock the Data Card**: In the PowerApps studio, select the form and then the data card you want to modify. In the properties pane on the right, click on the lock icon to unlock the data card.
2. **Modify the Default Property**: Select the TextInput control inside the data card. In the properties pane, find the 'Default' property.
3. **Write the Lookup Function**: In the 'Default' property, write the following formula:
Lookup(UserDefaultInfo, Email = User().Email).PhoneNumber
This formula will look up the 'UserDefaultInfo' list (or data source), find the record where the 'Email' field matches the current user's email, and return the 'PhoneNumber' field from that record.
Please note that 'UserDefaultInfo', 'Email', and 'PhoneNumber' should be replaced with the actual names of your data source, email field, and phone number field, respectively.
Also, make sure that the user has the necessary permissions to read the 'UserDefaultInfo' list.
WarrenBelz
146,601
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional