How to update Look up column of SharePoint list in PowerApp?
There are two ways to update SharePoint list –
Patch function – for individual controls
SubmitForm function – for form controls
In this blog we will only talk about SubmitForm functions using following scenario
We are having two SharePoint list –
Student
Training
We are having two type of training available –
Business Analysis using Business Model Canvas
Balance Sheet Analysis
But whenever any new student registers for any of the above training, student should also go through with mandatory induction training. So our Training list looks like this, for the brevity of blogs we are having only single property that is title of training . Similarly for the brevity of blog we are having only two property in Student list, Name and Training
To manage all student registration, we are having following PowerApp –
Home Screen
New Student Form
For new student we are having SharePoint form associated with Student list. We are only displaying Name card as we do not want to select training for new student registration, here training card is hidden.
On Accept we are using SubmitForm function
Now the default training we want to save for new student is “Induction”. Go to hidden Training card, select property “Default”.
Please note here that I have selected card not the DataCardValue field.
To edit Default property first to Advance setting and click on Unlock to change properties
Then change Default property as shown below –
Here varID and varTitle are the variables which you can set as per requirement, for demo purpose I set it like below as per the item of Training list.
varID = 1
varTitle = “Induction”
This entry explains that the data card is a reference column i.e. Look Up column, and the ID and Title of the value which we want to refer.
Now save your changes and give it a try.
Post relevance date : August 2020