Description
Excerpt |
---|
List elements can be dynamic and conditional |
Use case
You want to hide or display certain elements based on the response data
How to set it up
You modify the desired Lists in Mobile Configuration Files
Example: Customize how Quantity is displayed on Order List page
Based on integer value in "Status", different images are displayed
Code Block |
---|
|
<listConfiguration id="Orders" displayStatus="true">
<columns>
<column width="90%" xAlign="left" yAlign="top">
<elements>
<textElement fontId="headlineFont" text="{DisplayLine1}"/>
<textElement fontId="contentFont" text="{DisplayLine2}"/>
<textElement fontId="contentFont" text="{DisplayLine3}"/>
<textElement fontId="contentFont" text="{DisplayLine4}"/>
<textElement fontId="contentFont" text="{DisplayLine5}"/>
</elements>
</column>
<column width="10%" xAlign="right" yAlign="center">
<elements>
<imageElement width="6" dataMember="Status" horizontalAlignment="right" verticalAlignment="bottom"> <--- You must send out the value 'Status' in the GetOrders -response
<values>
<value imageId="locked" dataMemberValue="2"/>
<value imageId="attachment" dataMemberValue="3"/>
</values>
</imageElement>
</elements>
</column>
</columns>
</listConfiguration>
</..> |
Example: Customize how Quantity is displayed on Order Lines page
Based on boolean value 'MyCustomBooleanValueHere', different Quantities are displayed
Code Block |
---|
|
<listConfiguration id="OrderLines" displayStatus="true">
<rows>
<row>
<columns>
<column xAlign="left">
<elements>
<textElement fontId="headlineFont" text="{DisplayLine1}" verticalAlignment="top"/>
</elements>
</column>
<column xAlign="right" yAlign="top">
<elements>
<textElement dataMember="MyCustomBooleanValueHere" fontId="headlineFont" horizontalAlignment="right" verticalAlignment="top"> <--- You must send out the value 'MyCustomBooleanValueHere' in the GetOrderLines -response
<values>
<value dataMemberValue="false" text="{ActionDefinedQuantity}/{Quantity}"/> <--- The default element
<value dataMemberValue="true" text="{Quantity}"/> <--- The custom element
</values>
</textElement>
</elements>
<..> |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
sort | title |
---|
reverse | true |
---|
excerptType | simple |
---|
excludeCurrent | true |
---|
cql | label = "list" |
---|
|