The Zurich release has arrived! Interested in new features and functionalities? Click here for more

hide RITM choices based on catalog item form

tushar_ghadage
Tera Contributor

Hi all, 

I have req 

I have choice field on the form called emp type 

there only if I select third party employee choice (on the catalog item on portal ) then 

on the state field on the RITM level (when the catalog item is submitted) 

choices like open , assigned to vendor , awaiting customer information should be hidden.

But i am not sure how shall i approach can anyone please guide. 

 

thankss !!

 

1 ACCEPTED SOLUTION

anshul_goyal
Kilo Sage

Hello @tushar_ghadage,

Create a onLoad() catalog client script and select the 'Applies on Requested Items' checkbox. Use below code after that:

function onLoad() {
    //Type appropriate comment here, and begin script below
    var empType = g_form.getValue('employee_type'); // Get the value of Employee Type variable

    if (empType == 'third_party_employee') {
        g_form.removeOption('state', '4'); // add your options backend value
        g_form.removeOption('state', '7'); // add your options backend value
    }
}

 

If my response resolved your query, kindly mark it as Accepted and Helpful for future reference.

Best Regards,
Anshul

View solution in original post

5 REPLIES 5

anshul_goyal
Kilo Sage

Hello @tushar_ghadage,

Create a onLoad() catalog client script and select the 'Applies on Requested Items' checkbox. Use below code after that:

function onLoad() {
    //Type appropriate comment here, and begin script below
    var empType = g_form.getValue('employee_type'); // Get the value of Employee Type variable

    if (empType == 'third_party_employee') {
        g_form.removeOption('state', '4'); // add your options backend value
        g_form.removeOption('state', '7'); // add your options backend value
    }
}

 

If my response resolved your query, kindly mark it as Accepted and Helpful for future reference.

Best Regards,
Anshul

@tushar_ghadage Thanks for marking my answer as Accepted and Helpful !

also, one thing could you please help me on 

I have a variable 'location' which is on catalog item form and here as seen below i am trying to dot walk from start condition filter 

so, when location is offshore sla will trigger but I am not able to dot walk the location field here.

when I created it, it was not mapped to field so could this be a reason??

can you please guide me here?? 

 

thanks 

 

 Screenshot (347).png

@tushar_ghadage, we can't access catalog item variables in the SLA conditions, you've to map or store your location value on a field on catalog task form and then utilize it in the Start Condition.

Thanks