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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Is it possible to place time selector widget on master header in order to controll all mashups?

fmanniti
9-Granite

Is it possible to place time selector widget on master header in order to controll all mashups?

In my project I have a master with a menu and three mashups.

I would like to have this option

1) See current data

2) See history of data

if you click on 1 all tables, grids, widgets and whatever show you what's going on right now, if you click on 2 you will see data of a certain range of time in the past.

Now, if I have a single mashup it's easy to do because you just add a query service and bind a time selector widget with it but if you have several mashups is it possible to place the time selector in the master so that, if I click on option 2, all my three mashups will be set in "history mode"?

10 REPLIES 10

Hello, I believe what you need here are mashup parameters. See the documentation found here: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS187026

Hope this helps!

Tori

I'm studying mashup parameters just now so I might be wrong but, to what I understood, this works only between mashups but in masters I don't have a "Configure mashup parameters"

emoreira
12-Amethyst
(To:fmanniti)

An option would be adding it to the Session parameters..

  1. Create a ThingShape with the parameters you want to pass between mashups and add it to the UserManagementSubsystem;
  2. Add the Time Selector widget to the master and bind its parameters to the session properties you created
  3. Bind the session property to the mashup parameters and consume it inside each mashup.

I did not test it myself but it should work.

Cheers

Ewerton

Forgive me, but in point 1, did you mean Thing Shape instead of Data shape? Because I can only add ThingShape in UserManagementSubsystem

emoreira
12-Amethyst
(To:fmanniti)

Yes.. you are correct. I thought one thing and wrote the other!

I fixed it.

Ok, this works, just one more question (sorry, I guess it's quite stupid but I'm full of new information right now and I'm quite confusing):

if the time selector was in the same mashup I should have bind startdatetime with the start date of my query service, enddatetime with the end date and then Updated to the Service itself

Now that this is in the master, I binded StartDateTime and EndDateTime to the session and in mashup I binded the session parameters to the Query parameters. How can I bind the Updated event? Shell I create a new event in the ThingShape?

PaiChung
22-Sapphire I
(To:fmanniti)

This part you can either use Updated to trigger a Service which changes a different Session Parameter value and use the Session Parameter Value Changed event to trigger the Service

OR use the Session Parameter start/end time changed events directly, this gives a different behavior since you'll get an update when you change the start and an update when you change the end.

PaiChung
22-Sapphire I
(To:fmanniti)

Unfortunately Masters can't pass mashup parameters to Contained Mashups (Unless you go a very complicated route)

For this particular use case it is best to use Session Parameters to pass the values from the Master to the Contained Mashups.

Yes, thanks.

I'm following Ewerton's advice which looks to work

Thank you very much

PaiChung
22-Sapphire I
(To:fmanniti)

oops I started this response at one time and then posted it an hour later hahaha.

Announcements


Top Tags