Hello all!
I have a very simple app, where I have 2 filters which I need to work independently and also must show all records from the database in case nothing is selected.
But... I have no idea what I am doing wrong at this point. I have been trying every solution I can find, but now I am just messing it up rather than fixing it.
Here is some info from my app:
Filter1: Radio box: Choices(database.colnamedEmpresa)
Filter2: Combobox (single, not multiple choice): Distinct(database.colnamedAdmContrato; AdmContrato.displayname) this is a person/group type of column.
My gallery is filtered like this:
If(
!IsBlank(Radio3.Selected.Value)||!IsBlank(ComboBox1.Selected.Result)||IsEmpty(Radio3.Selected.Value)||IsEmpty(ComboBox1.Selected.Result)||IsEmpty(Radio3.Selected.Value);
Filter(database; Empresa.Value = Radio3.Selected.Value;ComboBox1.Selected.Result = 'Adm Contrato'.DisplayName); database)
Like I said, if my filters are cleared, it shows me all of the records from the database, but my filters are not working independently.
Due to the language set in my office and country, "," are ";"... it is very annoying and very confusing, specially when I am trying to copy someone's formula.
Please help me... I swear I can't see anymore where I am failing here
Thank you
Fernanda
Solved! Go to Solution.
Please consider changing your Formula to the following:
Filter(database;
(IsBlank(Radio3.Selected.Value) || Empresa.Value = Radio3.Selected.Value) &&
(IsBlank(ComboBox1.Selected.Result) || 'Adm Contrato'.DisplayName = ComboBox1.Selected.Result)
)
I hope this is helpful for you.
Please consider changing your Formula to the following:
Filter(database;
(IsBlank(Radio3.Selected.Value) || Empresa.Value = Radio3.Selected.Value) &&
(IsBlank(ComboBox1.Selected.Result) || 'Adm Contrato'.DisplayName = ComboBox1.Selected.Result)
)
I hope this is helpful for you.
OMG!!!! thank you!!!! it totally fixed it!!
Randy
Could I ask you something else regarding this very same solution??
I have another app where I implemented the very same solution and it worked perfectly, it has 3 filters lined up like the following
Filter('Prueba Informe Seg v2';
(IsBlank(cbusuario.Selected.Result) || Usuario.DisplayName = cbusuario.Selected.Result) &&
(IsBlank(cbgerencia.Selected.Result) || Gerencia.Department = cbgerencia.Selected.Result)&&
(IsBlank(ddempresa.Selected.Value) || Empresa.Value = ddempresa.Selected.Value))
But when I try to add a search box, I can't make it work. I have seen search function inside of filter, if function, filter inside of search, but i can't
My search function alone (it works perfectly and it search in 2 columns) is: Search('Prueba Informe Seg v2';pruebabusqueda.text;Title;pedido)
Could you please help me??
thank you in advance!
Fernanda