Bonjour,
Depuis longtemps, j'essaie d’intégrer[/img] une logic multiselect, mais je n'arrive pas. Voici la logique que j'utilise:
PROC GLOBAL
//a counter variable et la variable conteur qui nous permet de faire la boucle
numeric ctr ;
//la variable qui prend en charge la case à cocher
numeric i ;
//this variable is used for check box manipulation etde alphabet pour la multiselect
String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
//cette fonction est notre check box en fait ici il n y a rien et la même boucle peut être utilisée pour plusieurs questions
Function VerifyCheckBoxCodes(string checkBoxField)
String validOption = " " + alphabet [i :length(checkBoxField)] ;
do ctr = 1 while ctr <= length (checkBoxField)
if pos(checkBoxField[ctr :1], validOption )=<>0 then
errmsg ("option '%s'is invalid."checkBoxField (ctr ;1]) ;
reenter ;
endif ;
Après la compilation, l'erreur ci-après apparaît:
ERROR(VerifyCheckBoxCodes, 13): Invalid arithmetic or conditional expression
Je suis en attente de vos observations! Et merci d'avance.
Logic multiselect
-
- Posts: 16
- Joined: January 20th, 2019, 7:55 pm
- Location: Gourcy
Logic multiselect
- Attachments
-
- CSPro_13_05_2020.JPG (155.44 KiB) Viewed 4053 times
Re: Logic multiselect
Vous avez toujours des erreurs de syntaxe dans la logique:
- =<> n'est pas valide, je crois que vous voulez <> (different de)
- Il manque la virgule entre "option '%s'is invalid." et checkBoxField
- checkBoxField (ctr ;1] n'est pas valide, peut-etre checkBoxField[ctr:1]
- =<> n'est pas valide, je crois que vous voulez <> (different de)
- Il manque la virgule entre "option '%s'is invalid." et checkBoxField
- checkBoxField (ctr ;1] n'est pas valide, peut-etre checkBoxField[ctr:1]
Function VerifyCheckBoxCodes(string checkBoxField)
String validOption = " " + alphabet [i :length(checkBoxField)] ;
do ctr = 1 while ctr <= length (checkBoxField)
if pos(checkBoxField[ctr :1], validOption )<>0 then
errmsg ("option '%s'is invalid.", checkBoxField[ctr:1]) ;
reenter ;
endif ;
enddo;
end;
String validOption = " " + alphabet [i :length(checkBoxField)] ;
do ctr = 1 while ctr <= length (checkBoxField)
if pos(checkBoxField[ctr :1], validOption )<>0 then
errmsg ("option '%s'is invalid.", checkBoxField[ctr:1]) ;
reenter ;
endif ;
enddo;
end;
-
- Posts: 16
- Joined: January 20th, 2019, 7:55 pm
- Location: Gourcy
Re: Logic multiselect
Bonjour Josh;
Merci pour les corrections! Je vais utiliser cette nouvelle logique!
AMR
Merci pour les corrections! Je vais utiliser cette nouvelle logique!
AMR
Re: Multiselect Logic
this logic won`t work
if AGF_CHK in 1
then
skip to MJJ-MULT1;
endif;
the question is in alphanumeric and the value sets labeled in numeric
please help logic wont compile application
if AGF_CHK in 1
then
skip to MJJ-MULT1;
endif;
the question is in alphanumeric and the value sets labeled in numeric
please help logic wont compile application
Re: Logic multiselect
If AGF_CHK is multiselect (checkbox) then the item is alphanumeric and you can't use "in". You can use the ischecked() function instead https://www.csprousers.org/help/CSPro/i ... ction.html.
Next time please post a new question rather than responding to an old thread.
Next time please post a new question rather than responding to an old thread.