Skip to main content
16-Pearl
April 26, 2024
Solved

Validator behaving so weirdly

  • April 26, 2024
  • 1 reply
  • 2125 views

I am giving the input false but still validator is taking it as a true. Can anyone has similar experience about it?


MASHUP 1 and from here i am sending the value to another mashup which is false but another mashup is still taking it as a true why?

 

Jamal8548_1-1714113401072.png

 




MASHUP 2 : this validator execute when the value of the mashup parameter will change which i am sending from mashup 1. 

Jamal8548_0-1714113326943.png

Best answer by Rocko

Not much to share, I tried "Output=input;" as validator expression, just like you and enabled Auto Evaluate (I'm on TWX 9.5 though).

Most probably this is an order of execution problem.

Reduce the problem to the minimum. Create an empty mashup with a checkbox and a validator, link the output to a label and play with that before you embed this in a larger composition with popups, mashup closing and so on.

 

1 reply

19-Tanzanite
April 26, 2024

Hi @MA8731174 

 

Uncheck default output value in validator and try

Velkumar_0-1714114278704.png

 

Also use console.log to debug function further

 

/VR

 

MA873117416-PearlAuthor
16-Pearl
April 26, 2024

Hi @Velkumar  @Rocko I am having very very strange issue. look my validator is working completely fine in the same mashup and on true and false it opens two different mashups and for the output of the validator i am sending through mashup parameter. Strange thing is the true value is always going well but when output is false it just does not appear there in second mashup. 

here is my validator from mashup 1

Jamal8548_0-1714120538972.png

 


here is my code from the above validator from mashup 1
Jamal8548_1-1714120571541.png

 

 

 

and here is the validator from second mashup. here when i get false i want to close this mashup but unfortunately i am not able to do it why? can anyone please look at it?

 

Jamal8548_1-1714120440375.png

here in this validator when i get false i get nothing in console.log but for true my console.log displays true. thats why i am trying here the null/undefined etc..

i tried this code too
if(input ===false)

output =false;

 

but no its just does not work



i have tried another thing now. in mashup two directly accessing true or false but same behaviour it just does not get false from mashup 1. 

Jamal8548_0-1714120957859.png

 

I have tried below thing too. same results.

Jamal8548_1-1714121117568.png

 

 

Rocko
19-Tanzanite
April 26, 2024

The events work fine for me.

Try to use Auto Evaluate?

 

Also, don't use console.log. I thought you learnt that lesson the last time

😊🙂(there was supposed to be a smiley after this, but it got filtered out)