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

Need help with configuring dependent variables on a catalog item

DB1
Tera Contributor

Hello all,

 

I have fields as below

 

Select box1:

DB1_0-1691386969812.png

This has 4 options configured to the variable itself(select box type). Let me talk about 2 as the same approach can be followed for the rest

1. Archiving Request - dp_edi_archiving_request

 

DB1_6-1691387621106.png

 

2. Backend Request - edi_backend_Request

 

Upon selection. If "Archiving Request" is selected it should populate another select box as

Select box 1:

DB1_2-1691387272609.png

 

As there is a dependency I created a custom table with labels and choices as follows:

 

DB1_1-1691387177578.png

similarly I have created data for backend request as well

 

And I tried to configure it as follows

 

 

DB1_4-1691387439953.png

request_type is the select box 1 name.

 

However I see values for both Archving request and backend request on the select box. Please help me fix the issue

 

TIA,

 

@Ankur Bawiskar  @Ishaan Shoor @OlaN @Tony Chatfield1 

 

 

 

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, not quite sure that I have understood your intentions
but if your ‘request_type’ has a value of ‘dp_edi_archiving_request’, then your ‘u_ei_string_fields_labels’ value will need to match this for your encoded query to function correctly.

 

Perhaps you could update your post to provide clear details of your configuration, the reason behind creation of a custom table, the custom tables use and it’s context to the task\record you are creating from the producer?

Hi Tony, thanks for the reply

 

The intention of creating this custom table was to make use of the data for dependent variable configuration on a catalog only.

There are 48 variable sets and multiple variables which has dependencies. I tried UI Policy/ Client script.

It did not work as expected. When I finally came up with a client script to hide/show variables it works on the front end. However it does not appear correct on the variable editor of the catalog.

 

Client script

enabledropdown(newValue);

	function enabledropdown(Sb1){

		var allArr = ["edi_test_othes_description","edi_test_employee_role_change_transfer_label","edi_test_replacement_device_rma_label","edi_test_for_test_for_user_request_type_user_access_renewal_label","edi_test_for_test_remove_test_access_for_existing_user","edi_new_test_user_label","edi_test_logging_and_audit_report_attach_button","edi_test_updates_to_existing_vpn_label","edi_test_for_test_user_request_label","edi_test_employee_role_change_transfer_manager_acknowledgement_checkbox1","edi_test_for_test_new_code1_laptop_request_label","edi_add_test_access_for_existing_user_label","edi_test_new_vpn_projects_label","edi_test_updates_to_existing_vpn_label2_start","edi_test_for_test_for_user_request_type_user_access_renewal_label2_start","edi_new_test_user_manager_acknowledgement_label_start","edi_add_test_access_for_existing_user_start","edi_test_for_test_for_user_request_type_user_access_renewal_manager_ack","edi_add_test_add_test_access_for_existing_user_acknowledgement","edi_test_for_test_remove_test_email_id","edi_test_replacement_device_rma_description","edi_test_logging_and_audit_report_start_date","edi_test_new_vpn_projects_description","edi_new_test_user_manager_acknowledgement","edi_test_updates_to_existing_vpn_manager_ack","edi_test_for_test_new_code1_laptop_request_user_acknowledgement","edi_test_employee_role_change_transfer_manager_acknowledgement","edi_test_updates_to_existing_vpn_manager_ack_spl_access","edi_test_for_test_for_user_request_type_user_access_renewal_manager_ack_spl_access","edi_new_test_user_manager_acknowledgement_confirmation","edi_add_test_add_test_access_for_existing_user_acknowledgement_confirmation","edi_test_logging_and_audit_report_end_date","edi_test_updates_to_existing_vpn_description","edi_test_logging_and_audit_report_customer_name"];
		var inputArr = {
			"test":["edi_add_or_remove_email","edi_special_instructions|1"],
			"test":["edi_approving_manager","edi_site_id","edi_site_name","edi_hostname","edi_case_number","edi_stack_ids","note","edi_special_instructions|1"],
			"test":["edi_site_id","edi_site_name","edi_hostname","edi_tsm_and_ip_address","edi_special_instructions|1"],
			"test":["edi_tsm_client_installed"],			
			"test":["edi_case_number","edi_reason_for_restoration","edi_site_id","edi_site_name","edi_hostname","edi_how_many_suids","edi_special_instructions|1"],
			"test":["edi_site_id","edi_site_name","edi_hostname","edi_consolidation_information","edi_special_instructions|1"],
			"edi_other":["edi_special_instructions|1"]
		};


		allArr.some(function(field) {
			g_form.setValue(field,'');
			g_form.setMandatory(field, false);
			g_form.setDisplay(field, false);

		});


		if(Sb1 !== '' && Sb1 !== undefined){

			inputArr[Sb1].some(function(field) {
				var fld = field.split('|');

				var len = fld.length;
				//alert(len);

				g_form.setDisplay(fld[0], true);

				if(len == 1){
					g_form.setMandatory(fld[0], true);
				}
			});
		}	


	}

 On change client script I change the variables accordingly for every other variable.

 

But, on the RITM Form this does not apply and it does not show up the variables on the variable editor.

I was looking for help for different approach to solve this issue so I read that creating custom table is one solution

 

 

OlaN
Giga Sage
Giga Sage

Hi,

I've read your question twice now, but still can't follow the question, and the issue.

Sorry.

I need you to explain in more detail what you are trying to do, and what you want to achieve.