Hello to all!
Here comes another dummy question:
Trying to create a table_list filter with two or more dropdowns so they FILTER TOGETHER.
For this I created a code to put in READ_DATA Conditons rules :
Unfortunetely second dropdown - ligStatussFilter does not filter anything.
What am I doing wrong?
Thank you in advance -
Elita
Here comes another dummy question:
Trying to create a table_list filter with two or more dropdowns so they FILTER TOGETHER.
For this I created a code to put in READ_DATA Conditons rules :
$projVaditajs = $this->data('projVaditajsFilter');
$ligStatuss = $this->data('ligStatussFilter');
if (!empty($projVaditajs)) {
echo "Submission.projVaditajs/like:%{data:projVaditajsFilter}%";
}
else if (!empty($ligStatuss)) {
echo "Submission.ligStatuss/like:%{data:ligStatussFilter}%";
}
?>Unfortunetely second dropdown - ligStatussFilter does not filter anything.
What am I doing wrong?
Thank you in advance -
Elita
Just add multiple WHERE conditions to the read data action, with "continue" in the dropdown, which means if it's blank ignore it
That was my first thought; however if I choose Continue, I get an error: YOU HAVE AN ERROR IN YOUR SQL SYNTAX; CHECK THE MANUAL THAT CORRESPONDS TO YOUR MYSQL SERVER VERSION FOR THE RIGHT SYNTAX TO USE NEAR 'OR' AT LINE 1
My where conditions was as follows:
Model.field1 LIKE {data:dropdown1} CONTINUE
OR
Model.field2 LIKE { data:dropdown2} CONTINUE
My where conditions was as follows:
Model.field1 LIKE {data:dropdown1} CONTINUE
OR
Model.field2 LIKE { data:dropdown2} CONTINUE
Can you screenshot?
Hi Elita,
beside listing and filtering, what else your table is supposed to do ?
beside listing and filtering, what else your table is supposed to do ?
1) I don't think it should be "LIKE" I think it should be equals, surely?
2) Can't use an OR there, because if proVadaFilter is null, that first constraint won't be added then you end up with "SELECT * FROM table WHERE OR second_constraint"
2) Can't use an OR there, because if proVadaFilter is null, that first constraint won't be added then you end up with "SELECT * FROM table WHERE OR second_constraint"
jeah... so what should I do to FILTER the table with two or more dropdowns in cascade? ??
Max, table is simple submissions list - it is designed to keep agreements records:
Max, table is simple submissions list - it is designed to keep agreements records:
The "upload" and "box" icons what are they supposed to do ?
The dropdown ? you are updating selecting records ?
The "wrench" icon is for what ?
The dropdown ? you are updating selecting records ?
The "wrench" icon is for what ?
1) Wrench icon button is for Edit - it opens edit form wihich does not include file upload - the reason I will describe below.
2) Archive icon (box) button is for Uploaded file - If file (Agreement) is uploaded then it shows (switch ) the icon and one could download that file or take a look at it if needed;
3) If there is no file uploaded then there goes the last column - it opens the file upload form - here I have issues too - will describe below.
4) Column "Liguma statuss" contains simple dropdown for Status update and will be loop saved with the blue button "Saglabat labojumus";
5) first blue button opens the ADD New agreement form.
So far so good - all of this is working more or less.
Now the issuses:
1) I need three dropdowns that would filter the table - mostly it would be needed as follows:
In adittion, I have one problem with the last column - file upload.
Tried to implement POPUP form open from your Demo form. Unfortunately, there are some changes and I was not able to recreate that Demo since form fields area is depreciated; With Form area POPUP acted strangely - it was "hidden" below the table uper row and I was not able figure out what causes that.
Then I tried to create Modal form in CF6 - it works flawlessly alone; however when I implement that in the table, it does not work - opens white screen in new window.
So, for now I left file upload form opened in new window. It would be nice If i could implement popup though;
Other thing that I have not figured out FOR YEARS - since I started using CF and CCv - how to deal with the file upload in Edit form.
As far I understand - there is not possibility to read back uploaded file name in the file upload field; so I use text field to read stored filename; To avoid overwriting I cannot place other file upload in the same form; so I decided to do that the way described above; have separate file upload form.
(I am lazy enough to find the proper solution for this problem🙂)
So, Max, your kind input will be very much appreciated.
And again, thank you for these great products!
Sincerely,
Elita
2) Archive icon (box) button is for Uploaded file - If file (Agreement) is uploaded then it shows (switch ) the icon and one could download that file or take a look at it if needed;
3) If there is no file uploaded then there goes the last column - it opens the file upload form - here I have issues too - will describe below.
4) Column "Liguma statuss" contains simple dropdown for Status update and will be loop saved with the blue button "Saglabat labojumus";
5) first blue button opens the ADD New agreement form.
So far so good - all of this is working more or less.
Now the issuses:
1) I need three dropdowns that would filter the table - mostly it would be needed as follows:
- First, the table would be filtered by the Project Manager (column Projekta vaditajs Name: [projVad] ) - that is existing dropdown above ;
- Then filtered by the "Liguma status" Name: [ligStatuss] - Existing column with inline dropdowns;
- then perhaps filtered by the "Klients" Customer Name [Klients] or vice versa (3. 2.)
In adittion, I have one problem with the last column - file upload.
Tried to implement POPUP form open from your Demo form. Unfortunately, there are some changes and I was not able to recreate that Demo since form fields area is depreciated; With Form area POPUP acted strangely - it was "hidden" below the table uper row and I was not able figure out what causes that.
Then I tried to create Modal form in CF6 - it works flawlessly alone; however when I implement that in the table, it does not work - opens white screen in new window.
So, for now I left file upload form opened in new window. It would be nice If i could implement popup though;
Other thing that I have not figured out FOR YEARS - since I started using CF and CCv - how to deal with the file upload in Edit form.
As far I understand - there is not possibility to read back uploaded file name in the file upload field; so I use text field to read stored filename; To avoid overwriting I cannot place other file upload in the same form; so I decided to do that the way described above; have separate file upload form.
(I am lazy enough to find the proper solution for this problem🙂)
So, Max, your kind input will be very much appreciated.
And again, thank you for these great products!
Sincerely,
Elita
This topic is locked and no more replies can be posted.
