Skip to main content
1-Visitor
March 29, 2017
Solved

Get the selected row from a contained mashup

  • March 29, 2017
  • 2 replies
  • 8607 views

Hi,

I have a mashup where I launch a service in order to get an infotable which contains data for a Tree Table I want to display.

The Tree Table will be displayed in a contained mashup (name coming from another service) as depending on some parameters I don't want to show the same columns and rendering. I have added to the contained mashups a "Tree" parameters which is my infotable binded to the result of my service.


My problem is that when a row is selected in the Tree Table, I don't know how to provide the selected row to the parent mashup. I need that selected row for other purposes.


Thanks in advance for your help.

Best answer by nlaffargue

Hi Carles!

I think I found another solution by passing the primary key to the parent mashup and using an invisible dropdown list to select the row in the data.

Then I can use the selectedRow from the parent data directly.

https://www.dropbox.com/s/e0lzwp9pc3ugsrq/NicolasLaffargueSampleInnerSelectedRowV3.xml?dl=0

Best regards,

2 replies

14-Alexandrite
March 29, 2017

Dear Nicolas,

Regarding how to get the selectedRows from contained mashup, here is some steps you could follow and it should work:

1. in your contained mashup, create a Tree widget, and bind the necessary service to it, e.g., call GetDataTableEntries from a DataTable you created

2. in UserManagementSubsystem User Session Shape Settings section, add a new ThingShape "ts1" with only one property "selectedRows" with INFOTABLE type

3.bind the Selected Row(s) to the session's "selectedRows" parameter:

4. Likely, in your parent mashup, bind the selectedRows in session to the widget(e.g., you want to display the selectedRows in a Grid) :

5. view the mashup, you should see the Grid data change accordingly when the Tree table selected rows changed in the contained mashup.

Hope this helps,

Thanks,

Br,

Anna

1-Visitor
March 29, 2017

I think you can do it without using Session Variables, you just add a parameter on the inner mashup with the values you want to return as selected row, and then you just need to bind selected rows values to Mashup Parameters, this will be cleaner than Session Variables and also you don't mess up Session Variables for just a Mashup.

14-Alexandrite
March 31, 2017

Dear Carles,

The reason I consider to use session is that in containedMashup when you want to create a parameter with type of INFOTABLE, it is only out-bounded, so I could not assign the Selected Row(s) to the mashup paramter hence to pass it to the parent mashup. If you have any idea how to implement that, I'm also curious to know how

In contained mashup, if I just add a mashup parameter with STRING, NUMBER,etc but not INFOTABLE, it's two way bound -- in-bound and out-bound, but for INFOTABLE it's only out-bound.

Br,

Anna

nlaffargue1-VisitorAuthorAnswer
1-Visitor
April 4, 2017

Hi Carles!

I think I found another solution by passing the primary key to the parent mashup and using an invisible dropdown list to select the row in the data.

Then I can use the selectedRow from the parent data directly.

https://www.dropbox.com/s/e0lzwp9pc3ugsrq/NicolasLaffargueSampleInnerSelectedRowV3.xml?dl=0

Best regards,