I'm trying to put two commands in the items property in my gallery.
I need to put SortByColumns and I also want an If for other controls.
Here's what I have:
SortByColumns(
DemandasGLPCE;
"cr303_numerodemanda";
If(
classNumDemanda = true;
SortOrder.Ascending;
SortOrder.Descending
)
);;
If(MyVar=1; Filter(DemandasGLPCE;Elaborador=User().Email); If(MyVar=2;DemandasGLPCE;Search(DemandasGLPCE;Txt_Pesquisa.Text;Elaborador;Descricao;DOD;ETP;PB;Obs;NumeroDemanda;Pedido)))
Both commands, individually, work perfectly, but I can't run it as shown above.
NOTE: I used two semicolons to separate the commands, because my Office is in Portuguese.
Does anyone have a solution, please?