Hello,
Hope you're doing good.
I have a gallery with numbers that i can edit and save

what i'm trying to do is , when i save (i use a patch function), my numbers should be between 1 and 5, if one of the fields in the first column equals 0 , it should show a message.
I wrote something like this :
UpdateContext({varMsg:true});
ForAll(
RenameColumns(Gallery1.AllItems,"ID","CID"),
If( Value(ThisRecord.Field1.Text)<1 || Value(ThisRecord.Field1.Text)>5,
Patch(
MyList, {ID,CID},{
"patching my fields"
},
UpdateContext({varMsg:false})
)
);
If(varMsg = true,
Notify("Success",notificationType.Success),
Notify("Numbers should be between 1 and 5 - Please check",notificationType.Error)
)
If i just do the ForAll and the Patch , everything works but when i try to add the 2 conditions ...especially the one inside the ForAll ...it doesn't anymore , it shows errors and just says the "IF" has invalid parameters.
so I tried to change the UpdateContext insde the ForAll and put ({varMsg:false}) only , this doesn;t show an error but it doesn't seem to pick up the value cause whatever i do, it goes to the condition that is outside the ForAll and just shows "success"
Would someone have an idea how i can achieve this ?
Thanks a lot !