Hello everyone!
I have a roster in which I have predefined the elements in the first column, with elements from the previous question.
I would like to set a condition that allows me to display certain rows based on the elements checked in the question preceding the roster.
Can you please help me?
Bonjour tout le monde!
J'ai un tableau dans lequel j'ai prédéfini les éléments de la première colonne, avec des éléments de la question précédente.
J'aimerais mettre une condition qui me permet d'afficher certaines lignes en fonction des éléments cochés dans la question qui précède le roster.
Pouvez-vous m'aider svp?
Decide not to display some rows in a roster
Re: Decide not to display some rows in a roster
Please provide a bit more detail on what you mean. Do you want to change the contents of the roster itself i.e. deleting the rows that don't meet the condition? Do you want to keep the contents of the roster but skip over rows so that as the user traverses the roster so that only enter data for certain rows?
Re: Decide not to display some rows in a roster
I have a multiple choice question and then the roster.
At the roster level, each first column corresponds to each answer modality of the multiple choice question.
If an answer is not ticked, I want its line in the roster not to appear, and jump to the following row
At the roster level, each first column corresponds to each answer modality of the multiple choice question.
If an answer is not ticked, I want its line in the roster not to appear, and jump to the following row
Re: Decide not to display some rows in a roster
In that case you can use "skip to next" in the preproc of the first column to skip over the row.
Re: Decide not to display some rows in a roster
I tried but unfortunately it doesn't work. I don't know why.
I want to skip only to the next row if my condition is respected.
When I apply what you say, it skip to the next record record.
This is what I do :
PROC PRODUITS
preproc
$(1) = "Tomate";
$(2) = "Oignon";
$(3) = "Piment";
$(4) = "Aubergine";
$(5) = "Concombre";
$(6) = "Carotte";
$(7) = "Persil";
$(8) = "Haricot vert";
$(9) = "Laitue";
$(10) = "Poivron";
$(11) = "Chou";
$(12) = "Autre 1";
$(13) = "Autre 2";
$(14) = "Autre 3";
If pos("A", QUELS_SONT_VOS_PRODUITS_D_APPROVISIONNEMENT) = 0 then
skip to next;
endif;
I want to skip only to the next row if my condition is respected.
When I apply what you say, it skip to the next record record.
This is what I do :
PROC PRODUITS
preproc
$(1) = "Tomate";
$(2) = "Oignon";
$(3) = "Piment";
$(4) = "Aubergine";
$(5) = "Concombre";
$(6) = "Carotte";
$(7) = "Persil";
$(8) = "Haricot vert";
$(9) = "Laitue";
$(10) = "Poivron";
$(11) = "Chou";
$(12) = "Autre 1";
$(13) = "Autre 2";
$(14) = "Autre 3";
If pos("A", QUELS_SONT_VOS_PRODUITS_D_APPROVISIONNEMENT) = 0 then
skip to next;
endif;
Re: Decide not to display some rows in a roster
Rather than use pos("A") you need to check pos of the letter that corresponds to the current row. For the first row pos("A), for the second row pos("B"), for the third row pos("C")... It would be easier if you used numbers - 1,2,3,4... instead of letters. Then you could simply do:
with letter codes (A, B, C...) you have to convert the row number to a letter. You can do that by creating a string with the letters of the alphabet and then use [] to get the letter at a given position:
Code: Select all
string codeLigne = maketext("%d", curocc());
if ischecked(codeLigne, QUELS_SONT_VOS_PRODUITS_D_APPROVISIONNEMENT) = 0 then
skip to next;
endif;
Code: Select all
string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string codeLigne = alphabet[currocc():1];
Re: Decide not to display some rows in a roster
Thanks Josh!
I try and get back to you.
I try and get back to you.
Re: Decide not to display some rows in a roster
It works perfectly!
Thanks Josh!
Thanks Josh!