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

Is there a way to change a field in a master mashup when the contained mashup changes?

eribbeck
5-Regular Member

Is there a way to change a field in a master mashup when the contained mashup changes?

Here is the situation:

I have a Mashup Master that is used as a header for several different contained mashups. I have a label at the top of the header which I would like to change based on which contained mashup is displayed in the master. 

 

Here is what I have tried:

  • whenever a mashup is loaded: call SetGlobalSessionStringValue({ name: "MashupName", value: "Mashup 1 Header" }) where "Mashup 1 Header" is different for each contained mashup. (see ContainedMashupLogic.png attached)
  • on my mashup master, I am calling GetGlobalSessionValues when the mashup is loaded, and when MashupNameChanged event occurs (see MashupMasterLogic.png attached)
  • I am then running an expression to combine MashupName with some other static text, and bound the result of this expression to the label in the Header

 

What is happening:

  • the header never changes after initial load of the mashup, navigating between the contained mashups does not trigger the change in the header
1 ACCEPTED SOLUTION

Accepted Solutions
eribbeck
5-Regular Member
(To:eribbeck)

Figured it out...

  • I'm not sure if I wasn't using the properly or there is a bug, but I abandoned using SetGlobalSessionStringValue and GetGlobalSessionValues all together.
  • My second error was having the expression to pull together the full Header title be housed in the Mashup Master, I instead moved it to be calculated on each contained Mashup.

Here is the new flow:

  1. When any of the contained mashups are loaded: I run an expression to pull together what is needed to generate the mashup header name (a user variable and some static text).
  2. I bound the output of that expression to the MashupName session variable directly (not using the "SetGlobalSessionStringValue" service).
  3. On my Mashup Master (which has the header) I also bound the MashupName session variable directly to the label widget where it is being displayed (not using "GetGlobalSessionValues" service).

All in all, this was much simpler than trying to call the Set/Get services as well.

View solution in original post

3 REPLIES 3

Hi, 

 

I think after 8.4 the mashup parameters become bi-directional, so you may use that instead of session parameter directly

eribbeck
5-Regular Member
(To:zyuan1)

Hi,

Yes, that is true, but Master Mashups don't have mashup parameters.

eribbeck
5-Regular Member
(To:eribbeck)

Figured it out...

  • I'm not sure if I wasn't using the properly or there is a bug, but I abandoned using SetGlobalSessionStringValue and GetGlobalSessionValues all together.
  • My second error was having the expression to pull together the full Header title be housed in the Mashup Master, I instead moved it to be calculated on each contained Mashup.

Here is the new flow:

  1. When any of the contained mashups are loaded: I run an expression to pull together what is needed to generate the mashup header name (a user variable and some static text).
  2. I bound the output of that expression to the MashupName session variable directly (not using the "SetGlobalSessionStringValue" service).
  3. On my Mashup Master (which has the header) I also bound the MashupName session variable directly to the label widget where it is being displayed (not using "GetGlobalSessionValues" service).

All in all, this was much simpler than trying to call the Set/Get services as well.

View solution in original post

Announcements