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

Initialize a dropdown list widget with selection

SOLVED
Level 7

Initialize a dropdown list widget with selection

I'm trying to initialize a dropdown type list with a selection already shown.

I have a service that returns a list in the following format: Screen Shot 2019-03-05 at 18.22.29.pngreturned list with selection

When I use it on a mashup with a list item, the "selected" item is not displayed upon list loading.Screen Shot 2019-03-05 at 18.24.10.png

Screen Shot 2019-03-05 at 18.25.03.pngloaded list, no selection

How can I make it so the list initializes with the selected rows returned by my service?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Initialize a dropdown list widget with selection

I managed to make my list select a row using my "isSelected" property through the use of a validator and an expression.Screen Shot 2019-03-06 at 10.57.33.pngreturned infotable

 

Screen Shot 2019-03-06 at 10.57.49.pngvalidator checks it isSelected is true

 

Screen Shot 2019-03-06 at 10.57.56.pngif isSelected is true, expression takes selected property

 

Screen Shot 2019-03-06 at 10.58.03.pngselected property is set as selectedText in list

 

Screen Shot 2019-03-06 at 10.58.22.pnglist with specific selection on load

However, this only works for the first row of data returned by my service, is there a way to iterate over the returned data in the mashup so that my validator checks all rows of returned data?

4 REPLIES 4

Re: Initialize a dropdown list widget with selection

Hi, the "isSelected" is just a Boolean property in your Infotable result, it can be renamed to any words so it won't affect how List or this Infotable behaves.

 

The List has "AutoSelectFirstRow" setting, and also agrees to the SelectedRow(s) selection in the Infotable result from the source service. If the row you want is selected in the service, it will also shown as been selected in the List widget. 

Re: Initialize a dropdown list widget with selection

I managed to make my list select a row using my "isSelected" property through the use of a validator and an expression.Screen Shot 2019-03-06 at 10.57.33.pngreturned infotable

 

Screen Shot 2019-03-06 at 10.57.49.pngvalidator checks it isSelected is true

 

Screen Shot 2019-03-06 at 10.57.56.pngif isSelected is true, expression takes selected property

 

Screen Shot 2019-03-06 at 10.58.03.pngselected property is set as selectedText in list

 

Screen Shot 2019-03-06 at 10.58.22.pnglist with specific selection on load

However, this only works for the first row of data returned by my service, is there a way to iterate over the returned data in the mashup so that my validator checks all rows of returned data?

Re: Initialize a dropdown list widget with selection

If my understanding is correct ,you want to show both the property ("property" and "isSelected" ) in list widget ? If yes ,then you should use grid widget to show your all data as list display any one property which is selected in "DisplayField" and "ValueField" property attribute of List .

 

Let me know if this understanding is not correct . 

 

 

Thanks ,

Mukul Narang 

Re: Initialize a dropdown list widget with selection

I actually want the list to use the "isSelected" property as a way to show selected rows on mashup load