I have 2 ListBoxes, I'm trying to create a collection with all possible combinations of those lists. The problem in the formula is shown in the second ForAll, when you write it the SelectedItems option is not there, I tried also creating different collections and using them but it seems that it just doesn't work. This is the code I used in the Button:
Note: my powerapps is in Spanish, so there is no error in the semicolons and since comas changed to semicolons, semicolons changed to double semicollons
Collect(
Prueba;
ForAll(
ListBox1.SelectedItems;
{
varGrupoRamo: Value; // Capture the current item from ListBox1
Correo: User().Email;
TiempoEmpleado: 0;
id: 0;
// Inner ForAll loop for ListBox1_2
ForAll(
ListBox1_2.SelectedItems;
{
GrupoRamo: varGrupoRamo; // Use the captured value from ListBox1
ProcesoSV: Value; // Assuming Value is the property you want from ListBox1_2
Correo: User().Email;
TiempoEmpleado: 0;
id: 0
}
)
}
)
)