Hi All,
I have a dropdown value box containing ["Approved","Pending for Approval","Rejected"].
I have another edit datacard named 'Number of Workers'. I would like the dropdown value to update to "Pending for Approval" from any other statuses upon any changes to the editform. How do I achieve this?
Regards,
Alois
Solved! Go to Solution.
Thanks @gabibalaban ,
That was one of my possible thoughts as well and the error should show hopefully, however to pre-empt the code possibly should be
If(
!IsBlank(varStatus),
{Value:varStatus},
{Value:ThisItem.Status}
)
Hi @Alois ,
On the OnChange of the Number Of Workers control, put
UpdateContext({varStatus:"Pending for Approval"});
Reset(YourStatusDDName)
On the Default of the drop-down put
If(
!IsBlank(varStatus),
varStatus,
Parent.Default
)
and to clean up on the end of the save code (after SubmitForm) put
UpdateContext({varStatus:Blank()})
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 @WarrenBelz ,
I did as above and got the following error. I have tried replacing Parent.Default to ThisItem.Status to no avail.
Regards,
Alois
Did you set varStatus on the OnChange of the Text Box? Also, what is the error message?
Hi @WarrenBelz ,
Sorry for interference, but I have a strange feeling that the data source in a SharePoint list and the Status column is in fact a choice type one. 😊 ... It is just a though.
Thanks @gabibalaban ,
That was one of my possible thoughts as well and the error should show hopefully, however to pre-empt the code possibly should be
If(
!IsBlank(varStatus),
{Value:varStatus},
{Value:ThisItem.Status}
)
Hi @Alois ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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.
User | Count |
---|---|
229 | |
100 | |
97 | |
56 | |
33 |
User | Count |
---|---|
280 | |
110 | |
109 | |
64 | |
62 |