Hi Guys,
I would like to patch multiple rows at once.
Example Colour column values "blue, red, brown" patch column available as "Yes".
At the moment I'm doing this in 3 separate patch formulas.
Unsure if this is possible.
Any help is greatly appreciated.
Thanks
Without any code or app context this is a little hard to provide a specific solution.
However, assuming you have a number of checkboxes with colour names, they could be setup like so
// OnCheck property, assumes the Text properties are set to colour names eg 'Red', 'Brown' etc
Collect( colCheckedColours, Self.Text)
// OnUncheck property
RemoveIf( colCheckedColours, Value = Self.Text)
Then a button to update your records, using UpdateIf()
UpdateIf(
yourTableName,
Colour in colCheckedColours.Value,
{Available: "Yes"}
)
Thanks @EddieE
This will only work if all ID's are the same. In this case I only need to patch say "blue,green and red".
There are 10 different colours within the collection and nothing available that ties these colours together.
Assuming you have your Colour data in say a collection, you can use a Patch( ForAll()), eg
Patch(
yourTableName,
ForAll(
yourColourTbl,
{
ID: ID,
Colour: "Yes"
}
)
)
Note: the ID is needed in the above code because the functions needs something to reference to work properly. If you don't have ID, you'll need some other reference field