Hi,
Perhaps it is very easy what I am asking but it doesn't work for me.
I have an edit form in Pow Apps connected to a SP List 1 where :
- the field Plant is corresponding to a Choice column in the SP List 1
- the field Company Code is corresponding to a Single Text line column in SP List 1
In the Company Code field I want to bring the detail from SP List 2 through a lookup thus in the end when I do a selection in Plant field to be automatically displayed the related detail in the Company Code field.
On the Company Code Default I put the formula : LookUp(SPList 2,Plant =ThisItem.Plant.Value ,CompanyCode) , but it doesn't work. I tried with the formula : If( !IsBlank(DataCardValue4.Selected ),LookUp(SPList2,Plant= ThisItem.Plant.Value ,CompanyCode),Parent.Default) , it doesn't work . Not sure where and what formula I should use.
If you are so kind to provide me some indication I would be very grateful.
Thank you
Additional Details:
SPList1 :
Plant | Company Code |
AM01 | CO10 |
AM02 | CO10 |
AM03 | CO11 |
SPLIst2:
Plant (Choices (AM01,AM02,AM03)) | Company Code (Single Text Line) |
Solved! Go to Solution.
Hi @Carmen15 ,
According to your description, I've made a test for your reference:
1\ This is my SPList1. “ReceivingPlant” is a choice column.( The options in “ReceivingPlant” are: AE05 , AE06 , AE08). “ReceivingCompanyCode” is a Single line of text column.
2\ This is my SPList2. “Plant” is a Single line of text column. “CompanyCode” is a Single line of text column.
3\ Add an edit form control “Form1” an set its fields property like the picture.
4\ Set ReceivingCompanyCode card’s textinput control’s Default property to:
LookUp(SPList2,Plant=DataCardValue1.Selected.Value).CompanyCode // DataCardValue1 is the name of the combo box control. The combo box control is automatically generated by the ReceivingPlant field of the edit form.
5\ Add an Icon and set its onselect property to:
NewForm(Form1)
6\ Add an Icon and set its onselect property to:
SubmitForm(Form1)
7 The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks
Hi @Carmen15 ,
Could you tell me:
In addition, you could try the following code first:
LookUp(SPList 2,SPList2[@Plant].Value =ThisItem.Plant.Value ,CompanyCode)
Looking forward to your reply.
Best Regards,
Wearsky
Thank you for responding me!
Below my answers with italic . 🙂
Thank you so much !
Looking forward for your reply!
Carmen
SPList1 is looking like this :
SPlist2 is looking like this :
In the end I would like to have the Edit form like :
(On Company Code to appear instantly the corresponding value from the SPList2 taking into consideration the value AE05 that I selected from choices on Plant. The Plant values are unique values , but the Company Code are not unique, so the field Company Code in the form should look at the values from the SPList2 but taking into account the values from the Plant )
I didn't put any formula on Item of the Edit form . Should I put any formula ?
Hi @Carmen15 ,
According to your description, I've made a test for your reference:
1\ This is my SPList1. “ReceivingPlant” is a choice column.( The options in “ReceivingPlant” are: AE05 , AE06 , AE08). “ReceivingCompanyCode” is a Single line of text column.
2\ This is my SPList2. “Plant” is a Single line of text column. “CompanyCode” is a Single line of text column.
3\ Add an edit form control “Form1” an set its fields property like the picture.
4\ Set ReceivingCompanyCode card’s textinput control’s Default property to:
LookUp(SPList2,Plant=DataCardValue1.Selected.Value).CompanyCode // DataCardValue1 is the name of the combo box control. The combo box control is automatically generated by the ReceivingPlant field of the edit form.
5\ Add an Icon and set its onselect property to:
NewForm(Form1)
6\ Add an Icon and set its onselect property to:
SubmitForm(Form1)
7 The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks
You are awesome !
Thank you very much ! It is working! 🤗