Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Création d'une variable dont la valeur contient une variable dans le script

Bonjour.

Dans le script, je ne parviens pas à créer une variable dont la valeur contient d'autres variables. En effet, celles-ci sont interprétée directement par le script.

Je m'explique.

Set Entity_Field_With_KeyDate =

= if(NOT IsNull($(Temporal_Granularity_Field)),$(Entity_Field));

Voilà la définition d'une de mes variables.

Quand je liste mes variables dans QV après le chargement, j'aurai aimé avoir comme valeur pour Entity_Field_With_KeyDate : = if(NOT IsNull($(Temporal_Granularity_Field)),$(Entity_Field))


Mais a la place, j'ai l'interprétation des variables:

= sum(if(NOT IsNull(=if(Temporal_Granularity=0, DateKey_Day_Label,
if(Temporal_Granularity=1, DateKey_Week_Label,
if(Temporal_Granularity=2, DateKey_Month_Label,
if(Temporal_Granularity=3, DateKey_Quarter_Label,
if(Temporal_Granularity=4, DateKey_Year_Label)))))),='[Nombre de tâches]'))

Cordialement.

1 Solution

Accepted Solutions
sfatoux72
Partner - Specialist
Partner - Specialist

L'astuce, c'est de le faire en 2 étapes:

Set Entity_Field_With_KeyDate = "if(NOT IsNull(§(Temporal_Granularity_Field)),§(Entity_Field))";
Let Entity_Field_With_KeyDate = Replace(Entity_Field_With_KeyDate, '§', '$');

View solution in original post

1 Reply
sfatoux72
Partner - Specialist
Partner - Specialist

L'astuce, c'est de le faire en 2 étapes:

Set Entity_Field_With_KeyDate = "if(NOT IsNull(§(Temporal_Granularity_Field)),§(Entity_Field))";
Let Entity_Field_With_KeyDate = Replace(Entity_Field_With_KeyDate, '§', '$');