Solved

FSM-Default Pop Up Blocking

  • 29 April 2020
  • 6 replies
  • 125 views

Userlevel 5
Badge +9

Can Someone tell how we can block the default pop up which is being occurred by the customized client script(baseline client script also),if we apply that script to any screen.

Like in this screenshot i have applied one client script to work order screen(Request screen).Functionality wise the script is working fine but the default pop up is coming.i just want to block that pop up.How can i do that?

 

icon

Best answer by Lee Pinchbeck 29 April 2020, 18:25

View original

6 replies

Userlevel 7
Badge +24

Hi,

I do not believe you can disable the pop-up as, whilst the script appears to function, it is triggering an error and the system will need to display that error. 

If you correct the script so that it does not trigger the error then the pop up will not occur.

It looks like from the error that you may get away with putting each round operation in its own set of brackets as that may be what is causing it to confuse the > operation i.e. (round(P,0))>(round(Q,0)).

If that does not work you may need to post the full script so someone can take a look at it in context.

Kind regards,

Lee Pinchbeck

Userlevel 5
Badge +9

Dear Lee,

Thanks for your quick turn around.

This is the script.The intention of this script is to show the value of addition of two numbers. 

If the addition is more then 100,it will show 100 and if the addition value is below 100 it will show the original addition value.(like 23+12=35 it will show as 35<100) (if 200+13=100 it will show as 213>100).

 

var P = round(getControlValue('request','user_def3'),0);
var Q = round("100.00",0);
if (round(P,0) > round(Q,0))
    {
     setControlValue('request','user_def3',Q);
    }
        
    else
        {
         setControlValue('request','user_def3',P);
        }

 

 

Thanks and Regards,

Pinmaya

Userlevel 7
Badge +24

Hi Pinmaya,

Not sure if I am missing something here but I cannot see any addition in the script. It pulls from one user def field and then updates that same user def field. Depending on what triggers this script that could then cause a loop of the script executing.

Also, not sure why you have set 100 as a variable if it will always be the maximum value. I would expect to see P being set as the sum of two fields and then a comparison in the if statement between P and 100.

Kind regards,

Lee Pinchbeck

Userlevel 5
Badge +9

Dear Lee,

Here we are pulling the data from user_def3 and then comparing that value with 100.

Can you please provide me a client script for  addition of two numbers and comparing the result with third variable using for loop and it should work without any pop up once i apply that to any customized button.

Like below you can see add 1,add 2 and sum columns.On the sum column i want to apply the client script.

 

 

Userlevel 7
Badge +24

Hi Pinmaya,

It would likely be best to raise a consulting resource request case for assistance in how to construct the client script as this would be heading beyond the scope of the Community forum as it is a specific technical question rather than general guidance or information.

That way you can be assigned the best resource to give you a worked answer to your specific requirements.

Kind regards,

Lee Pinchbeck

Userlevel 5
Badge +9

Hi Lee,

Thanks for your valuable suggestion.

Thanks,

Pinmaya

Reply