I have a gallery with a filter attached. As I filter, the gallery changes and "selects" an item on it's own. I will call it "soft-selecting" since the user hasn't actually clicked the item. While filtering, other fields (labels, html-text, etc...) are updated by the soft-selected item. I also have another gallery that gets updated from a collection based on the selected item. However, this gallery will not update until the item is "hard-selected". It's almost like I need a "On Change" action instead on the filtered gallery.
Here are my formulas, etc:
The filtered gallery (PeopleGallery) OnSelect:
Set(person, PeopleGallery.Selected);
ClearCollect(emailAndPhones, {
Type: "email",
Text: "<a href='mailto:"&PeopleGallery.Selected.email&"'>"&PeopleGallery.Selected.email&"</a>"
});
If(!IsBlank(PeopleGallery.Selected.email2),
Collect(
emailAndPhones, {
Type: "email",
Text: "<a href='mailto:"&PeopleGallery.Selected.email2&"'>"&PeopleGallery.Selected.email2&"</a>"
}));
If(!IsBlank(PeopleGallery.Selected.phone_office),
Collect(emailAndPhones,{
Type: "phone",
Text: "<span>Office: "&PeopleGallery.Selected.phone_office&"</span>"
}));
If(!IsBlank(PeopleGallery.Selected.phone_cell),
Collect(emailAndPhones,{
Type: "phone",
Text: "<span>Cell: "&PeopleGallery.Selected.phone_cell&"</span>"
}))
Secondary Gallery (EmailAndPhoneGallery): Items = emailAndPhones
Things I've tried that didn't work:
- Setting the default value of PeopleGallery to the First filtered item
- Using a variable for PeopleGallery.Selected
- Selecting using Select() the secondary gallery from PeopleGallery (error about not being able to select outside the container)
- Selecting using Select() the First filtered item in the PeopleGallery OnSelect
- Creating the collection in EmailAndPhoneGallery Items field (I get an error about using a behavior function here)
- Creating an "anonymous" collection in the EmailAndPhoneGallery items field (that doesn't seem to be supported)
Any help is appreciated. Thanks!