I am trying to get all records on a certain date (date only field) with a certain status (text field) and update the status. There are multiple dates to update at once and there may be multiple records per date.
To get the dates where statuses should be updated, I have a collection I'd like to loop through to get all matching values and then update status.
Here is what my formula looks like right now. VisitsToRemove is the collection of dates and I have verified dates are being added (using a gallery). Meetings is the entity name. For the filter, I'd like to update all records that match the date value and whose statuses are not upcoming or pending and then set the appointment status to closed. I have used the filter portion in a gallery with a typed out date and did get expected record set. However, I don't know how to try to work out why a variable date portion is not working so does anyone see any errors with this or have a better way to go about this?
ForAll(
VisitsToRemove,
UpdateIf(
Meetings,
And(
'Meeting Date' = Value,
Not(pre_appointmentstatus = "Upcoming"),
Not(pre_appointmentstatus = "Pending")
),
{pre_appointmentstatus: "Closed"}
)
);
There are no errors in the formula or after I click the button with formula, it's just that records are not updating with Closed status

Report
All responses (
Answers (