Hi
I've a textbox and wanna filter a gallery with it.
My formula:
With({Controle:ControleDespesas; Enderecos: ENDERECOS};
Sort(
Filter(Controle;
Ano = Text(AnoEscolhido);
Despesa = DespesaEscolhida;
txtbusca.Text = Blank() Or RefIDEnd = LookUp(Enderecos;txtbusca.Text in Cidade).Idend || LookUp(Enderecos;txtbusca.Text in Endereco).Idend
);RefIDEnd;Ascending)
)
My screen:
The textbox (txtbusca) and filter is not working for "Cidade" and "Endereco".
What I did wrong?
I've to filter "ControleDespesas" and textbox need to search in another sharepoint list named "ENDERECOS". The field of "IDEnd" from "ENDERECOS" is number and make reference to field "RefIDEnd" from "ControleDespesas".
In gallery the fields Cidade" and "Endereço" are lookup datas :
Endereço: LookUp(ENDERECOS;Idend=ThisItem.RefIDEnd).Endereco
Cidade: LookUp(ENDERECOS;Idend=ThisItem.RefIDEnd).Cidade
My sharepoint lists are as bellow:
ENDERECOS:
ControleDepesas:
RefIDEnd = IDEnd
Thanks in advance
Solved! Go to Solution.
I got it.
Delete textsearchbox , put a dropbox instead wtih all "Endereco" (address).
And change gallery filter formulta to:
With(
{Controle:ControleDespesas; Enderecos: ENDERECOS};
Sort(
Filter(Controle;
Ano = Text(AnoEscolhido);
Despesa = DespesaEscolhida;
dpdFiltroEnd.Selected.Endereco = Blank() Or RefIDEnd = LookUp(Enderecos;Endereco = dpdFiltroEnd.Selected.Endereco).Idend
);
RefIDEnd;Ascending)
)
Now it's working.
Thank you
Hi @alessandramaced ,
Try the below - you need to refer to the field value in each LookUp and also bracket your and/or areas
With(
{
Controle:ControleDespesas;
Enderecos: ENDERECOS
};
Sort(
Filter(
Controle;
Ano = Text(AnoEscolhido) &&
Despesa = DespesaEscolhida &&
(
txtbusca.Text = Blank() ||
RefIDEnd = LookUp(
Enderecos;
txtbusca.Text in Cidade
).Idend ||
RefIDEnd = LookUp(
Enderecos;
txtbusca.Text in Endereco
).Idend
)
);
RefIDEnd
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
not working, know shows nothing in gallery
I think the problem is that I can't use lookup, because can exist more than one record with same "Cidade" or part of Address ("Endereco").
Is that possible to filter gallery like this?
That does not really help me - unless I can understand what it is you are trying to do, I can only rely on the code you posted and try to make it valid syntax I assume the code is not producing errors?
I got it.
Delete textsearchbox , put a dropbox instead wtih all "Endereco" (address).
And change gallery filter formulta to:
With(
{Controle:ControleDespesas; Enderecos: ENDERECOS};
Sort(
Filter(Controle;
Ano = Text(AnoEscolhido);
Despesa = DespesaEscolhida;
dpdFiltroEnd.Selected.Endereco = Blank() Or RefIDEnd = LookUp(Enderecos;Endereco = dpdFiltroEnd.Selected.Endereco).Idend
);
RefIDEnd;Ascending)
)
Now it's working.
Thank you
User | Count |
---|---|
163 | |
90 | |
73 | |
64 | |
62 |
User | Count |
---|---|
210 | |
153 | |
96 | |
88 | |
66 |