Hello common ones
I have a problem again and I need your help.
I create a collection when I start the app. This collection has 10 columns. And please imagine that these 10 columns are filled with the number 0 when you create them.
I would also like to add that this collection only ever contains 1 record.
Now I choose an action on another screen. The result of this action is that in column 5 of my collection, the NULL should become a 1.
How do I do it?
Best regards
RoScha
Solved! Go to Solution.
hi @RoScha if this is your collection for example ClearCollect(_ThatCollection,{Col1: 0,Col2: 0,Col3: 0,Col4:0,Col5:0,Col6:0})
Then seeing you will hav eone record only you can update col5 with
Patch(_ThatCollection,First(_ThatCollection),{Col5:1})
hope that helps
hi @RoScha if this is your collection for example ClearCollect(_ThatCollection,{Col1: 0,Col2: 0,Col3: 0,Col4:0,Col5:0,Col6:0})
Then seeing you will hav eone record only you can update col5 with
Patch(_ThatCollection,First(_ThatCollection),{Col5:1})
hope that helps
Yes, that's the solution ... and again so easy in the end ... only I couldn't figure it out.
Thanks a lot @rubin_boer for your quick help.
Best regards
RoScha
I have another question about that.
Please imagine the following: Column 5 of the collection can contain either a 1 or a 0.
Now I would like to control two buttons via the Visible property.
Button 1 should be visible if there is a 1 in column 5 of the collection, button 2 should be visible if there is a 0 in column 5 of the collection.
How can I do that with a collection?
Best regards
RoScha
hi @RoScha sure you can add this to the visibility of the buttons
Button visible on true: If(YourGallery.Selected.Col5=1,true,false)
Button visible on false: If(YourGallery.Selected.Col5=0,true,false)
Hope it helps
@rubin_boer I understood your solution as follows:
I have to display my collection in a gallery and then I check the 1 or the 0 via the gallery.
But that's not how I wanted to solve it.
Can I check a column of a collection with the If statement?
hi @RoScha sure change the YourGallery.Selected. to First(YourCollection).Col5
Button visible on true: If(First(YourCollection).Col5=1,true,false)
Button visible on false:If(First(YourCollection).Col5=0,true,false)
that should do it.
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |