Thank you for the response. I actually came up with a work around that is similar to yours. I added an "updated" column to my CDS entity with default to "no". Then added a Form4 on a blank screen that won't be navigated to with just a picture and set it's item property to:
First(Filter(entity, commonKey = opGal.Selected.commonKey, updated = 'updated (entity)'.No
The opGal gallery is looking at my main data table and filtering to a set of records. 'commonKey' is the column that holds a value common to certain records on the table, NOT in the opGal set. If a record in the opGal set with a commonKey is changed, all of the records with the same commonKey have to also change certain fields, but not all of them. So I have a Form1 to change the opGal.Selected, that's no problem.
Form4's add image is set to default to opGal.Selected.image. I have a button to SubmitForm(Form1) I'll paraphrase below:
SubmitForm(Form1);
If(opGal.Selected.common = Yes,
SubmitForm(Form4))
Then Form4's OnSuccess property:
If(!IsBlank(First(Filter(entity, commonKey = opGal.Selected.commonKey, updated = 'updated (entity)'.No)),
SubmitForm(Form4);
Patch(entity, First(Filter(entity, commonKey = opGal.Selected.commonKey, updated = 'updated (entity)'.No),
{
updated = 'updated (entity)'.Yes
shortTextCDS: opGal.Selected.shortTextCDS,
longTextCDS: opGal.Selected.longTextCDS
}
);
Refresh(entity)
So that works, the "ForAll" is essentially handles by telling form the default to the first record of the records with same commonKey and updated = No, sends changes with the SubmitForm then changes the updated to Yes which kicks it of the filtered table and the next in line gets changed until that table is blank. I tried using Form4 to also change the updated column and the other columns that needed to be changed but it wasn't working well...it was finicky for some reason. The patch seemed to work better.
It seems to work fairly well though it is very work-aroundy. There's also a step tied into the Form1's submit button to reset the "updated" column back to "No" if it's to be a globaledit:
If(globalEdit,
ClearCollect(globEdit, ShowColumns(Filter(entity, commonKey = opGal.Selected.commonKey), "crd2e_stepkey"));
ForAll(RenameColumns(globEdit, "crd2e_stepkey", "patchKey"),
Patch(entity, LookUp(entity, stepKey = patchKey),
{
updated: 'updated (entity)'.No
}
));
I suppose this could be done at the end of Form4's submit routine but I don't think it really matters. Anyway, this worked. It would be nice however if I could simply patch an new image to a record with an existing image. That would be amazingly simple and it's kind of mind boggling to me that it isn't possible in any straightforward way.