/scripts/ahub.form.attachments.js
0

setVariableValueExt Parameters using a universe

Nov 03, 2016 at 09:56 AM

97

avatar image

Hi,

I am using the following to pass the values of users into a prompt which is held in the universe. The prompt in the universe is called "Users" but the following doesn't seem to work. The source is a universe rather than BEx which I normally use. is there another format to pass the variable prompt name? I have searched SCN and found ps seems to be at the front of most of the variables? Is there a way I can find out the name I should use in the passing of the prompt name

DS1.setVariableValueExt("Users", users_names);

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Mohd Fahad Nov 04, 2016 at 06:51 AM
0

Hi Leo,

PS = passing 'prompt' value for 'single' case
PM = passing 'prompt' value for 'multiple' cases

Try below to test with HARDCODED values first, i.e

*Make sure your Universe Prompt for Users is SET as optional

For Single Value = DS_1.setVariableValueExt("psUsers", "John");

For Multi Values = DS_1.setVariableValueExt("pmUsers", "John;Sam;Hector;Leo");

Once this works for you, all you got to do is create a mechanism to feed setVariable script a String value instead of hard-coded "John".
In Short, create a variable that will store all selected_string_values_for_Users, from Listbox or Multi-selection Drop-down component that user selects and you want to pass back to Universe.

Hope this helps...

Share
10 |10000 characters needed characters left characters exceeded
Poovarasan Boopalan Nov 03, 2016 at 07:52 PM
0

Hi Leo,

You can pass the values by using DS1.setVariableValueExt().

The values format needed to be in string format with each names separated by semicolon ";".

In your case value for users_names = "user1;user2;user3;user4"

Also, In universes "ps" is specified for single value prompt. The multiple value prompts will be prefixed "pm". It seems you are using single value prompt, so try passing only value. I think it will work.

Thanks,

Poovarasan

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content