AnsweredAssumed Answered

Getting values from a value list

Question asked by ndveitch on Nov 21, 2016
Latest reply on Nov 21, 2016 by philmodjunk

Hi there,

 

I need to ask a quick question regarding the ValueListItems (  ) and Substitute ( ) function. I have a global field that has a checkbox set based off a field in a temp table. Then I have a global calc field, ValueListItems ( Get ( FileName ) ; "FIFONames" ) which lists all the values in my value list on the checkbox field. I was playing around with an idea of comparing the global checkbox field to the global valuelist field to see which items have been selected and I noticed something strange in dataviewer. Well it looks strange, but that could be because I am using the functions incorrectly .  In dataviewer I tried a calc, Substitute ( z_FIFOOrder::zg_Index ; z_FIFOOrder::zg_Names ; "" ).

 

The calc worked well if I only selected one item or multiple consecutive items in the checkbox field. The minute I jumped over on of the choices or i select them in a funny order the whole list is shown. for example:

 

List:

1 - Apple

2 - Banana

3 - Cherry

4 - Dates

5 - Eggplant

 

If no names are selected in the checkbox field, then all the names appear in dataviewer. If I select 1 then 2 then 3, the step in dataviewer will remove apple, banana and cherry from the list. If I select 3 then 4 then 5, the step in dataviewer will show only cherry, dates and eggplant. Yet if I had to select 1 then 2 then 4, or 1 then 4 then 2, all the values appear in the subsitute ( ) in  dataviewer.

 

Why does this happen?? Surely selecting the values in random order shouldn't matter, or does it come down to the way the data is stored when the values are selected in the checkbox?

Outcomes