Hi
I have a SP list called "WASTE CODE" which have 2 columns (refer to the attached files): .
1. Title - Single line of text
2. Category of Waste - - Single line of text .
SP List with 2 columns
I have created a custom PowerApps form for another SP list named "WASTE CARD FORMS" (refer to the attached files). . The Waste Code field in the custom form is being reset to Dropdown field pulling data from SP list "WASTE CODE" in the TItle column, and its working fine. .
I cant figure out how to auto populate the "CATEGORY OF WASTE" field in the custom form based on the corresponding Category of Waste value in the WASTE CODE list, when the WASTE CODE is selected from the Dropdown field in the custom form.
Thanks
Solved! Go to Solution.
Hi @whasmadi ,
Do you want to auto-populate the "CATEGORY OF WASTE" field in your custom form based on the selected Waste Code value?
I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Waste Code Dropdown box to following:
Distinct('Waste Code', Title)
set the Update property of the Waste Code field data card to following:
WasteCodeDropdownbox.Selectd.Result
Set the Default property of the "CATEGORY OF WASTE" field in the custom form to following:
If(
SharePointForm1.Mode = FormMode.New,
LookUp('Waste Code', Title = WasteCodeDropdownBox.Selected.Result, 'Category Of Waste'),
Parent.Default
)
Please take a try with above solution, then check if the issue is solved.
Best regards,
Hi @whasmadi ,
I am using names here based on your screenshots - I will call your fields WasteCodeTxt and CatWasteTxt - change to your control names. I have also called your Form EditForm1. In the Default of CatWasteTxt
If(
EditForm1.Mode = FormMode.New,
Lookup(
'Waste Code',
Title = WasteCodeTxt.Text,
'Category Of Waste
),
Parent.Default
)
This will default on new records, but show existing data on other modes.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @whasmadi ,
Do you want to auto-populate the "CATEGORY OF WASTE" field in your custom form based on the selected Waste Code value?
I have made a test on my side, please consider take a try with the following workaround:
Set the Items property of the Waste Code Dropdown box to following:
Distinct('Waste Code', Title)
set the Update property of the Waste Code field data card to following:
WasteCodeDropdownbox.Selectd.Result
Set the Default property of the "CATEGORY OF WASTE" field in the custom form to following:
If(
SharePointForm1.Mode = FormMode.New,
LookUp('Waste Code', Title = WasteCodeDropdownBox.Selected.Result, 'Category Of Waste'),
Parent.Default
)
Please take a try with above solution, then check if the issue is solved.
Best regards,
Hi Kris,
Thanks for the suggestion, However, I got "Invalid argument" error when trying your method.
.
If(
SharePointForm1.Mode = FormMode.New,
LookUp('Waste Code', Title = Dropdown1.Selected.Result, 'Category Of Waste'),
Parent.Default
)
.
See the attached image.
.
Thanks.
hi Warren,
.
Thanks for the suggestion. However I still get Invalid Argument error using your formula.
.
Thanks
HI Kris,
.
I's managed to solve the problem by making minor change to your formula. Below is what is working for me now for the Category of Waste field:
.
Default = If (SharePointForm1.Mode = FormMode.New, LookUp ([@'Waste Code'], Title = Dropdown1.Selected.Result, 'Category Of Waste'), Parent.Default)
.
Thanks
Hi @whasmadi ,
I was only demonstrating the syntax - I cannot see your data or form structure properly. This would have been sorted on the next reply once I knew this as I do not generally do lengthy assumptions and confuse people if I guess wrong.
User | Count |
---|---|
222 | |
98 | |
95 | |
55 | |
34 |
User | Count |
---|---|
272 | |
108 | |
106 | |
64 | |
60 |