UX: How do you get the correct list values in the code?


I’m trying to retrieve list values and I can’t seem to get them in my code. When creating a data source, I selected LIST as the type, and entered the module and the name of the list. Is there anything else required in order to expose the list values?… OK, so I do get the list values, but I have a few issues and questions:

  • 1. I put triProject as the module, and the list name is triProjectType. There are three triProjectType lists in the system and only one in the triProject module, but I receive the wrong list entries. Why?
  • 2. I can’t use the same lookup field style as query data sources. For example, this is the code, where capitalprojectType is the data source. I get the correct number of entries in the drop-down, but the values are empty.

<triplat-ds name=”capitalprojectType” data=”{{_capitalprojectType}}”>
</triplat-ds>

<triplat-select-input value=”{{cprojects.projectType}}” select-src=”{{_capitalprojectType}}” floating-label label=”Project Type *”>
</triplat-select-input>

Here are some answers:

  • 1. You may open a PMR to verify this behavior. It seems in your case that the data source is reading the wrong list.
  • 2. You need to specify the name of the property that you want to show. In your case the select-src array is a list and each object inside a list has a value property. So you need to add the (value-name=”value”) attribute to your triplat-select-input tag.

<triplat-select-input value=”{{cprojects.projectType}}” select-src=”{{_capitalprojectType}}” label=”Project Type *” value-name=”value”>
</triplat-select-input>

Continue reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s