Hello,
I'm a newbie and this is my first post so apologies in advanced.
We have an issue with a set of fields within a gallery (which has a collection data source):

We have an issue whereby for each of the input text fields shown above we have to clicking twice on the field before we can enter in any data.
The “double” clicking action to set focus in one of the text inputs comes about we believe because the input text fields have an OnChange action:
If(!IsBlank(NameColInput.Text) && NameColInput.Text <> "" &&
!IsBlank(CompanyColInput.Text) && CompanyColInput.Text <> "" &&
!IsBlank(PositionColInput.Text) && PositionColInput.Text <> "",
Set(varValidRow, true),
Set(varValidRow, false));
Update(RecipientsCollection,
LookUp(RecipientsCollection,IDCol=ThisItem.IDCol),
{IDCol: ThisItem.IDCol,
NameCol: NameColInput.Text,
CompanyCol: CompanyColInput.Text,
PositionCol: PositionColInput.Text,
ValidRow: varValidRow}
)
We thought about moving the functionality for saving the entered collection data to the submit button at the end of the process.
This seemed like a better place for it anyway. However, we came across other issue with the Gallery.AllItems value being null.
What we thought about using on Submit was a ForAll loop to go through the Gallery.AllItems and patch the collection.
However, this didn’t work because the AllItems was always returning null (is this a bug?).
To get around the Allitems issue, we also thought about swapping in the collection and out for the Gallery.AllItems but you can’t loop through and update the same collection within a ForAll loop:
ForAll(
RecipientsCollection,
Notify("[" & IDColInput.Text & "]");
Patch(RecipientsCollection, LookUp(RecipientsCollection, IDCol = Value(IDColInput.Text)),
{IDCol: Value(IDColInput.Text),
NameCol: NameColInput.Text,
CompanyCol: CompanyColInput.Text,
PositionCol: PositionColInput.Text})
So we've hit a blank now and we don't know what to try next - does anyone have any ideas?
Thanks
Adrian