So I'm currently trying to build a Inventory App and I was playing with the data of a column that indicates if a PC is avaible or not.
Currently I show that status with an icon changing color depending of the choice.
I want to change the actual value of that status column from the item from avaible ("Libre") to unavaible ("Ocupado") whenever I click on the Icon itself. I manage to do it but i wonder if there's an easy way to do it. The Choice column name is Disponibilidad.
I used Updateif but I cant understad how the ID inside it works, I set it on 1 and it works but I truly don't know how.
I'm thinking of using a lot of buttons that will change column values so I want to learn the right way to do it.
Here's the code currently working:
UpdateIf( 'Proyecto Facu'; ID = Gallery1.Selected.ID && Gallery1.Selected.Disponibilidad.Value = "Ocupado"; { Disponibilidad: { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"; ID: 1; Value: "Libre" } }; ID = Gallery1.Selected.ID && Gallery1.Selected.Disponibilidad.Value = "Libre"; { Disponibilidad: { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"; ID: 1; Value: "Ocupado" } } )
Solved! Go to Solution.
If it is a choice column then you shouldn't need the 'ID: 1". If it is a lookup column then you would need it and the value would be ID of the item in the lookup list.
If it is a choice column then you shouldn't need the 'ID: 1". If it is a lookup column then you would need it and the value would be ID of the item in the lookup list.
Oh, great. So I can remove that part and it will continue to work, besides that is this well done?
Hi @FacundoGorla ,
Is there any error or red lines under this formula in PowerApps? If not, then the formula should work as expected.
Regards,
Mona
It worked just fine! thanks! already marked the answer!
User | Count |
---|---|
253 | |
106 | |
88 | |
51 | |
43 |