MultiValue.SetValueOptions

MultiValue.SetValueOptions

Anonymous
Not applicable
856 Views
2 Replies
Message 1 of 3

MultiValue.SetValueOptions

Anonymous
Not applicable

Hi All

 

I am populating a multivalue list from an array and sometimes not all the values are new

 

I am using the SetValueOptions with index

 

The definition is as follows:

 

MultiValue.SetValueOptions(True, DefaultIndex := 0)

Forces the parameter to have a value which is in its multi-value list. If you then change the multi-value list, it also sets the current value of the parameter to one of the values in the list. This function does not change the value if it is found in the new list.

  • DefaultIndex := 0

    If the current parameter value is not in the new list, the parameter is set to the first value (Index 0) in the list.

Is it possible to force the value of the multivalue to always take the value of the index even though the value exists in the list?

0 Likes
857 Views
2 Replies
Replies (2)
Message 2 of 3

perrysc
Enthusiast
Enthusiast

Why not just save the current index to a temp variable, set the multivalue list to either Nothing or a dummy list ("abc","123","xyz"), and then set again the multivalue list to the actual values you want?

 

0 Likes
Message 3 of 3

Anonymous
Not applicable

I wanted to avoid using dummy lists...

 

When I use RuleParametersOutput() etc. the dependent lists etc will be affected with the dummy list value.

 

For the moment I have enclosed the list-setting in a True/false statement

 

Setting the list to an index of Size(n) array

0 Likes