I try to customize a form that is based on a sharepoint list.
In that form the choice field "SP_Status" get's the default selected value from a variable called "varStatus":
I can already set a default selected value for the field:
The problem for me is is to change the value of the field "SP_Status", based on other events.
For instance, if the field "SP_AssignedTo" is set, the field "SP_Status" shall automatically change to "02 - In Process (Manufacturer)"
The field "SP_AssignedTo" is a person field and I tried to implemend my update rule as follows:
If(Not(IsEmpty(DataCardValue21.Selected.DisplayName)), //If current field != Null... Set(varStatus,{ Value: "02 - In Process (Manufacturer)" }), //...set varStatus to "02.." Set(varStatus, { Value: "01 - Inquiry" })) //else, set varStatus to "01.."
My thinking is, that the OnChange-Event will update the value of the variable "varStatus" and the default selected value in the field "SP_Status" will be update based on the input of the variable.
In fact my rule is working somehow, but not as expected:
If I open an item in view mode I get the following information:
In view mode the field "SP_Status" is empty, but on the left side you can see that the status of the column "SP_Status" is "01 - Inquiry".
When I now open the form in edit mode, the field "SP_Status" is still empty. I expect that the value is "01 - Inquiry".
When I update the field "SP_AssignedTo" the field "SP_Status" will be updated. That's fine.
Corresponding to above rule I expect that the value of the field "SP_AssignedTo" will again be updated to "01 - Inquiry", if I delete the value of "SP_AssignedTo", but in fact nothing happens in my tests.
What do I have to do, to make above scenario work?
Solved! Go to Solution.
I believe your setting varStatus based on null or not od assigned to value is working.
I am showing you why your edit/view views are not showing the existing value.
1. Set the default property of SP_Status to varStatus
2. you have set the default value foe NEW property of SharePointIntegration and didn't set for the VIEW and EDIT form. So, your edit and view is not showing the correct one. It should be:
I believe your setting varStatus based on null or not od assigned to value is working.
I am showing you why your edit/view views are not showing the existing value.
1. Set the default property of SP_Status to varStatus
2. you have set the default value foe NEW property of SharePointIntegration and didn't set for the VIEW and EDIT form. So, your edit and view is not showing the correct one. It should be:
Hi @pNabin,
It was not completely clear for me, how the choice field works.
Now I got some interesting input.
Thank's for your help!
Hi @sakleboe,
On of the resource I would recommend is @Shanescows youtube tutorial on Combobox. He has simplified combox and has different tips and tricks on it. PoweApps Combobox - Search, Filter, Default values, and more
-Nabin
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
182 | |
71 | |
44 | |
33 |
User | Count |
---|---|
335 | |
265 | |
114 | |
69 | |
66 |