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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Initialize a dropdown list widget with selection

jorgeporras
10-Marble

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: returned list with selectionreturned 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

loaded list, no selectionloaded list, no selection

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

ACCEPTED SOLUTION

Accepted Solutions

I managed to make my list select a row using my "isSelected" property through the use of a validator and an expression.returned infotablereturned infotable

 

validator checks it isSelected is truevalidator checks it isSelected is true

 

if isSelected is true, expression takes selected propertyif isSelected is true, expression takes selected property

 

selected property is set as selectedText in listselected property is set as selectedText in list

 

list with specific selection on loadlist 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?

View solution in original post

4 REPLIES 4

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. 

I managed to make my list select a row using my "isSelected" property through the use of a validator and an expression.returned infotablereturned infotable

 

validator checks it isSelected is truevalidator checks it isSelected is true

 

if isSelected is true, expression takes selected propertyif isSelected is true, expression takes selected property

 

selected property is set as selectedText in listselected property is set as selectedText in list

 

list with specific selection on loadlist 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?

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 

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

Announcements


Top Tags