Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi ,
If you set MashupParameterBindings to Collection,for exampe: { "description": "theDesc" }, then the Collection will has a mashup parameter called Event:Description .
I bind the Event:Description to a express with auto evaluate and hope it can reflect the change of the paramter, but I feel very confused about the behavior.
In the inner mashup, I bind the new value to a expression and bind the expression's output to the mashup paramter, what I observed is:
Please try the attached xml file to reproduce the strange behavior:
1. Input value to New Value field in any cell on the left screen, then click "Button", you'll see the upper text box get changed but the new description on the right screen doesn't change.
2. This time input value to New Value then click "Click" , repeat twice , you'll see the New description on the right screen always display the previous value .
Is it a bug or designed behavior ?
Regards,
Sean
Hi @seanccc.
Which version of ThingWorx are you running? We tested under 8.4.2 using the provided mashup, but were unable to recreate the issue you describe.
Regards.
--Sharon
My environment is ThingWorx 8.4.2-b2151 + Chrome 76.0.3809.100 + Windows server 2016 + Postgresql 10.x.
Did you test it via importing my attached entity.xml ?
regards,
Sean
Hi @seanccc.
Yes, we did test it using the .xml you provided.
To ensure we're on the same page, can you provide some screenshots of you're configuration and what you're seeing? You may also want to test it using a different browser.
Regards.
--Sharon
I found why you cannot reproduce it . I exported the mashup via tag but for certain reason , not all of the mashup get exported.
Please try the attached new entity. You'll find a mashup called "CollectionEventParamter" after importing. Executing the mashup, you'll observe:
Input value to any "New Value" field on the left screen, then if click Button , the right screen has no changes. if click "Click", the "New description" of right screen display the previous value of the "New Value".
I tried in both of Chrome and Firefox, and got the same result.
Regards,
Sean
Hi @seanccc.
We're sorry for the delay. We have tested with the .xml you provided and the behavior is as you described. However, it appears the issue is related to your logic. If you enter a value and click the first time, it populates the description. But if you click a 2nd time without changing anything, the value that was entered is populated.
We're really not understanding the use case. Please explain the functionality you are trying to test with this mashup.
Regards.
--Sharon
My use case is simple , my collection widget has a mashup which contains valuedisplay. I want the click on the valuedisplay can notify the outer collection. For each parameter defined in collection widget ,there is a property called Event: %ParameterName%. I want to utilize the property to achieve the purpose.
I expect the logic would be: click the valuedisplay -> update the mashup paramter inside collection -> monitor the parameter change via property Event: %ParameterName% -> do something in Expression when change occurs.
However , as I described in the post , I found the property Event: %ParameterName% doesn't reflects the current value .