The CreatorCon Call for Content is officially open! Get started here.

Set Multi Row Variable Set field value based on catalog item variable value

Prudhvi Raj4
Tera Guru

Hello,

I have catalog item which has multi row variable set, the requirement is when the environment variable on the catalog item is selected as "Staging" the variable on the multi row variable set need to auto populate the value. I have tried below code which is working on UI but not on Service portal

function onLoad() {
       if(parent.g_form.getValue('environment') == 'Staging'){
       g_form.setValue('subscription_term_months', '12');
      g_form.setReadOnly('subscription_term_months', true);
     g_form.setVisible('test_account', false);
   } 
}

 

Is there anything need to be done to the populate MRVS variable on service portal? please suggest.

Thanks,

Prudhvi

1 ACCEPTED SOLUTION
3 REPLIES 3

Kalyani Jangam1
Mega Sage

Hi @Prudhvi Raj4 
Screenshot 2022-11-30 at 5.44.01 PM.png

Please confirm your UI type is ALL

Yes, UI Type is ALL and that's where I see the issue I am getting Javascript error on the portal when the script runs

Prudhvi Raj4
Tera Guru