Hi,
All is in title
A simple dropdown with distinct value of a field to use it to filter results
Regards
ok I found
All is in title
A simple dropdown with distinct value of a field to use it to filter results
Regards
ok I found
Hi Chris,
You need to configure the where conditions field with the correct condition:
Best regards,
Max
You need to configure the where conditions field with the correct condition:
table_field:{data:dropdown_field_name}
Best regards,
Max
Hi Chris,
Best regards,
Max
table_field/in:{data:dropdown_field_name}
Best regards,
Max
sorry Max, it is not my day🙂
1064 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 '''' at line 1
regards
1064 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 '''' at line 1
regards
Hi Chris,
Which one returned this ? the single value or multiple values ?
Best regards,
Max
Which one returned this ? the single value or multiple values ?
Best regards,
Max
Hi Chris,
The error message does not have any clues, please test with the single value and adjust the dropdown field name, does it work ?
Best regards,
Max
The error message does not have any clues, please test with the single value and adjust the dropdown field name, does it work ?
Best regards,
Max
With single value
SELECT `fonds`.`id` AS `fonds.id`, `fonds`.`isin` AS `fonds.isin`, `fonds`.`nomProduit` AS `fonds.nomProduit`, `fonds`.`societeGestion` AS `fonds.societeGestion`, `fonds`.`repSG` AS `fonds.repSG`, `fonds`.`natureProduit` AS `fonds.natureProduit`, `fonds`.`visaAMF` AS `fonds.visaAMF`, `fonds`.`dateVL` AS `fonds.dateVL`, `fonds`.`VL` AS `fonds.VL`, `fonds`.`rembAnticipe` AS `fonds.rembAnticipe`, `fonds`.`fondLiquide` AS `fonds.fondLiquide`, `fonds`.`millesime` AS `fonds.millesime`, `fonds`.`dateAgrement` AS `fonds.dateAgrement`, `fonds`.`valeurNominale` AS `fonds.valeurNominale`, `fonds`.`tauxReductISF` AS `fonds.tauxReductISF`, `fonds`.`tauxReductIR` AS `fonds.tauxReductIR`, `fonds`.`tauxPME` AS `fonds.tauxPME`, `fonds`.`zoneGeo` AS `fonds.zoneGeo`, `fonds`.`dateVLorigine` AS `fonds.dateVLorigine`, `fonds`.`limiteSouscription` AS `fonds.limiteSouscription`, `fonds`.`depositaire` AS `fonds.depositaire`, `fonds`.`comComptes` AS `fonds.comComptes`, `fonds`.`dureePlaceConseil` AS `fonds.dureePlaceConseil`, `fonds`.`fraisGestion` AS `fonds.fraisGestion`, `fonds`.`droitsEntree` AS `fonds.droitsEntree`, `fonds`.`droitsGarde` AS `fonds.droitsGarde`, `fonds`.`miniQuantite` AS `fonds.miniQuantite`, `fonds`.`miniMontant` AS `fonds.miniMontant`, `fonds`.`dureeVie` AS `fonds.dureeVie`, `fonds`.`periodicite` AS `fonds.periodicite`, `fonds`.`observation` AS `fonds.observation`, `fonds`.`fiche` AS `fonds.fiche`, `fonds`.`notreSelection` AS `fonds.notreSelection`, `fonds`.`published` AS `fonds.published`, `fonds`.`performance` AS `fonds.performance`, `fonds`.`perfAnnualisee` AS `fonds.perfAnnualisee` FROM `arobas17_fcpi_fonds` AS `fonds` WHERE `fonds`.`published` = '1' AND `fonds`.`societeGestion` = '' ORDER BY `fonds.millesime` DESC LIMIT 30;
the `fonds`.`societeGestion` = '' is empty
SELECT `fonds`.`id` AS `fonds.id`, `fonds`.`isin` AS `fonds.isin`, `fonds`.`nomProduit` AS `fonds.nomProduit`, `fonds`.`societeGestion` AS `fonds.societeGestion`, `fonds`.`repSG` AS `fonds.repSG`, `fonds`.`natureProduit` AS `fonds.natureProduit`, `fonds`.`visaAMF` AS `fonds.visaAMF`, `fonds`.`dateVL` AS `fonds.dateVL`, `fonds`.`VL` AS `fonds.VL`, `fonds`.`rembAnticipe` AS `fonds.rembAnticipe`, `fonds`.`fondLiquide` AS `fonds.fondLiquide`, `fonds`.`millesime` AS `fonds.millesime`, `fonds`.`dateAgrement` AS `fonds.dateAgrement`, `fonds`.`valeurNominale` AS `fonds.valeurNominale`, `fonds`.`tauxReductISF` AS `fonds.tauxReductISF`, `fonds`.`tauxReductIR` AS `fonds.tauxReductIR`, `fonds`.`tauxPME` AS `fonds.tauxPME`, `fonds`.`zoneGeo` AS `fonds.zoneGeo`, `fonds`.`dateVLorigine` AS `fonds.dateVLorigine`, `fonds`.`limiteSouscription` AS `fonds.limiteSouscription`, `fonds`.`depositaire` AS `fonds.depositaire`, `fonds`.`comComptes` AS `fonds.comComptes`, `fonds`.`dureePlaceConseil` AS `fonds.dureePlaceConseil`, `fonds`.`fraisGestion` AS `fonds.fraisGestion`, `fonds`.`droitsEntree` AS `fonds.droitsEntree`, `fonds`.`droitsGarde` AS `fonds.droitsGarde`, `fonds`.`miniQuantite` AS `fonds.miniQuantite`, `fonds`.`miniMontant` AS `fonds.miniMontant`, `fonds`.`dureeVie` AS `fonds.dureeVie`, `fonds`.`periodicite` AS `fonds.periodicite`, `fonds`.`observation` AS `fonds.observation`, `fonds`.`fiche` AS `fonds.fiche`, `fonds`.`notreSelection` AS `fonds.notreSelection`, `fonds`.`published` AS `fonds.published`, `fonds`.`performance` AS `fonds.performance`, `fonds`.`perfAnnualisee` AS `fonds.perfAnnualisee` FROM `arobas17_fcpi_fonds` AS `fonds` WHERE `fonds`.`published` = '1' AND `fonds`.`societeGestion` = '' ORDER BY `fonds.millesime` DESC LIMIT 30;
the `fonds`.`societeGestion` = '' is empty
Hi Chris,
How do you add the dropdown field to the connection ? is it inside a form view ? and where exactly is this view ?
Best regards,
Max
How do you add the dropdown field to the connection ? is it inside a form view ? and where exactly is this view ?
Best regards,
Max
Hello Max,
I found, mystake in name field... Sorry
Now, I need include a test in where fields like this
if({data:select_sg}!="") fonds.societeGestion:{data:select_sg}
in fact apply the filter only if not empty...
And How to put a label in the dropdown for the empty value like "select your company"
Reagrds
I found, mystake in name field... Sorry
Now, I need include a test in where fields like this
if({data:select_sg}!="") fonds.societeGestion:{data:select_sg}
in fact apply the filter only if not empty...
And How to put a label in the dropdown for the empty value like "select your company"
Reagrds
Hi Chris,
the empty label can be added in the options box like this:
The if not empty check can be like this:
The /- at the end of the value means that the parameter will be skipped if empty.
Or in php:
Best regards,
Max
the empty label can be added in the options box like this:
=Select your company
The if not empty check can be like this:
fonds.societeGestion:{data:select_sg}/-
The /- at the end of the value means that the parameter will be skipped if empty.
Or in php:
<?php
if(!empty($this->data("select_sg"))){
return [["fonds.societeGestion", $this->data("select_sg")]];
}
Best regards,
Max
Hi Chris,
I have just tested this here in a dropdown options:
The first option has empty value and text = "test"
I also checked your page, the "Nature de produit" is working as expected, the first option is empty.
Best regards,
Max
I have just tested this here in a dropdown options:
=test
y=Yes
n=No
The first option has empty value and text = "test"
I also checked your page, the "Nature de produit" is working as expected, the first option is empty.
Best regards,
Max
Yes, and the only one thing is : i declared it first with utf8 char likes éè
clear cache and try to recreate it but nothing,
Regards
clear cache and try to recreate it but nothing,
Regards
Hi Chris,
But how do you have the "Nature de produit" working ? how do you have it setup ?
Best regards,
Max
But how do you have the "Nature de produit" working ? how do you have it setup ?
Best regards,
Max
This topic is locked and no more replies can be posted.