Skip to main content
15-Moonstone
April 20, 2021
Solved

Passing data between mashups using the nav function

  • April 20, 2021
  • 2 replies
  • 1927 views

So, I found this post:

 

https://community.ptc.com/t5/ThingWorx-Developers/Passing-the-data-between-two-different-mashups/td-p/508669

 

However, I have a question. Can you use the navigation function without actually navigating? Can you just have it pass data between two mashups? If not, how can I do this?

Best answer by Ike@ACE

As much as the coder in me cringes at it, I went with the session variables solution. I really don't like how they are global, though. Is there some way to clear it's data when it is not needed anymore?

2 replies

5-Regular Member
April 21, 2021

There is an alternative to achieve this with no need to Navigating, that would be using a Contained Mashup widget and hiding it(Uncheck Visible property)
Please check the article on this link for detailed steps - https://www.ptc.com/en/support/article/CS187026

if this meets your requirement.

As far as Navigation function is concerned, I don't believe it is possible to exchange data between mashups without Navigating.

Other way to do this would be to use session variables as mentioned in the community post link you shared.

Ike@ACE15-MoonstoneAuthorAnswer
15-Moonstone
April 21, 2021

As much as the coder in me cringes at it, I went with the session variables solution. I really don't like how they are global, though. Is there some way to clear it's data when it is not needed anymore?

5-Regular Member
April 27, 2021

Session variables are written to the database if they're flagged as persistent, however this is not recommended for performance implications, please check this article for more details: https://www.ptc.com/en/support/article/CS275262

Also, it is worth checking Article for Best Practices on using Session Variables on this link - https://www.ptc.com/en/support/article/CS232199 

Community Manager
May 10, 2021

Hi @Ike@ACE.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon