1, difference behaviour b/w platform and in portal

nameisnani
Mega Sage

Hi Team , 

 

 

There is a difference behavior between Portal and Platform ends. 

 

We have catalog called Lost or Stolen Device. Based on device type, a Short description is populating .

 

For example, if I choose device type is 'Laptop' >> In short description field, it is populating like this, i.e [ Lost/Stolen Laptop Report] [By requestor for name 

 

For this, i have written client script.

nameisnani_0-1723628019063.png

 

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }

    var reqFor = g_form.getDisplayValue('requested_for');
    var newvall = g_form.getDisplayValue('device_type'); //replace with the backend name of device type field


    //g_form.setValue('short_description_1', newvall +' '+ ": Device Type " + ' ' + " Reported By " + reqFor);
    g_form.setValue('short_description_1', "Lost/Stolen " + newvall + ' ' + " Reported By " + reqFor);





}

nameisnani_1-1723628019248.png

 

 

 

Now , the problem I am facing is that this is working fine in portal, but when we are checking from the platform , it is not working .

 

If you could see in the below screenshot , in the short description field, the requestor for name is not populating .

 

nameisnani_2-1723628019047.png

 

can anyone please help me with this issue , where i have to update in my scirpt? 

 

It should work at platform level also . 

1 REPLY 1

Rajesh Chopade1
Mega Sage

Hi @nameisnani

your script looks fine but check following points again:

Double-check the exact field names in the table dictionary. Use g_form.getValue() instead of g_form.getDisplayValue() to see if any value is returned. The former is less prone to visibility issues.

 

Check any dictionary overrides, ACLs (Access Control Lists), or client scripts that might alter field behavior. For reference fields, ensure that the field value is correctly set and available.

 

Open the browser's developer tools (e.g., Console in Chrome) to check for any errors that might occur when the form loads. Ensure there are no syntax errors or other script issues.

 

i hope my answer helps you to resolve your issue, if yes please mark my answer correct & helpful.

thank you

rajesh