Skip to main content
Question

Validation of two column using client script

  • 5 September 2024
  • 4 replies
  • 28 views

Hi Team,

I need to validate the bus number against the registration number. So, I was using the below query. The issue is that when I add an integer value to the bus number field, the registration number gets populated, but I also want the registration number to be shown when I enter a string value in the bus number field then also registration no should populate in mobile application.

below find the reference of query and mobile screen attachment. I want the result to be like the second screenshot. now when my input type is string registration no is not fetching.

var busno = getControlValue("escalation", "user_def5");
var regno = getDBValue(stringFormat("select code_value from global_code_table where code_name = 'IN_AHM_AMT_BUS_NO' and sequence = '{0}'order by sequence", busno ));
setControlValue("ESCALATION","USER_DEF24", regno);

 

Hi @aishwarya,

Can you post a screenshot of the global code you are searching? 

Because generally the ‘sequence’ field in the global_code_table is numeric and it will yield no results if searched by a string value.


Hi @IniNimesK 

thank you for your response.

please find the attachment for your reference


Hi @aishwarya,

Can you post a screenshot of the global code you are searching? 

Because generally the ‘sequence’ field in the global_code_table is numeric and it will yield no results if searched by a string value.

@aishwarya as mentioned here it seems like you need to build a proper mapping to search instead of using the sequence field. Either using a user_def or using the parent code values in the global code table. 


Hi @IniNimesK,

Thank you for your response. Request if you can elaborate on this or help me with an example.


Reply