Thank you for these responses! I should elaborate more on how the page is scoped. I am reverse engineering previous development, so apologies for the missing details.
The power apps page does contain a form and a gallery, but to a different SharePoint list. The form/gallery data source is called G5.
G5 has a foreign key relationship to the SharePoint list Responses through the ID field. ID in G5 matches IDKey in Responses.
For each record in the G5 gallery there are 3 icons that could display. The visible property of the icon is determined based on the value in a field named Future in the collection ColResponsesNew.
Below is the conditional icon's visible condition if Future field value is 'Conditional'
If(
Last(
Filter(
ColResponsesNew,
Value(IDKey) = ThisItem.ID && Country = CountrySelectionDropdown.Selected.Country_Name
)
).Future = "Conditional",
true,
false
)
When the icon is selected in the gallery record (Icon On Select property) this sets a variable to true.
When the variable is true a new page section displays (see second screenshot)
In the new page section there is a radio button named Future. If the Future selection is "Conditional" then the ComboBoxFutureCond is visible.
ComboBoxFutureCond has Items property defined as ["a","b","c","d"]
The combobox ComboBoxCondFuture DefaultSelectedItems property is defined as ["c"]
The group section of the page section has a submit button.
The submit button On Select property is
Set(IDSubmit,Last(Filter(ColResponsesNew,Country = CountrySelectionDropdown.Selected.Country_Name,
Value(IDKey) = BrowseGalleryLocalPage.Selected.ID)).ID);
Patch(
Responses,
LookUp(Responses, ID = IDSubmit),
{
FutureCond:
ComboBoxCondFuture.Selected.Value)
}
);
In the Responses SharePoint list, FutureCond is a single line text field.
I tried to set a variable in the DefaultSelectedItems property but it isn't accepted.
Set(FutureCondSubmit,Last(Filter(ColResponsesNew,Country = CountrySelectionDropdown.Selected.Country_Name, Value(IDKey) = BrowseGalleryLocalPage.Selected.ID)).FutureCond);
Where is the best place to define the variable and what should be the proper syntax?
Then in the DefaultSelectedItems for the ComboBoxCondFuture, would the statement be like so?
If(IsBlank(FutureCondSubmit, "C", FutureCondSubmit)
Thank you!