cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Validator behaivng so weirdly

Jamal8548
11-Garnet

Validator behaivng so weirdly

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

7 REPLIES 7

Hi @Jamal8548 

 

Uncheck default output value in validator and try

Velkumar_0-1714114278704.png

 

Also use console.log to debug function further

 

/VR

 

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
17-Peridot
(To:Jamal8548)

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)

Jamal8548
11-Garnet
(To:Rocko)

Hey @Rocko  I have removed console.log also now. but still it cannot take false value. console.log was for another test actually. can you please share your code for validators. Its still not working for me. If I  give hardcoded false then it works but it is not coming from 1st mashup. 

Rocko
17-Peridot
(To:Jamal8548)

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.

 

Jamal8548
11-Garnet
(To:Rocko)

I have filled the checkbox on the same mashup 1 with this false and send the state of it to second mashup but same issue.

 

INFO:

With the output false i open another mashup which is mashup 3 and i pass the output to the mashup parameter of mashup 2 so thats an issue may be. but on father mashup i put checkbox and there the output is working completely fine but i am unable to take it through mashup parameters actually. 

So if i open the mashup 2 again after closing it manually then it gets close means for the first it is not working.

 

WORKFLOW: i open the mashup 2 then from it i  do something to open mashup 3 but onclose function of mashup 3 i send the mashup parameter to mashup 2 to close it but when i close mashup 3 it does not get close means mashup 2 is still open then i close it manually and if i open the mashup 2 again it gets close means now the its closing the mash up 2. how can i fix this execution problem. i dont think so i have much area available to play in thingworx, any idea?

Top Tags