Enumerations
(Created page with "none|thumb|685x685px Returning a list of strings for each Enum value. ImportColumn.allInstances.asString Select an enum value from the lis...")
 
No edit summary
Line 1: Line 1:
[[File:Defining enumerations.png|none|thumb|685x685px]]
[[File:Defining enumerations.png|none|thumb|685x685px]]


Returning a list of strings for each Enum value.
The defined enumeration is a class in the model's typesystem.
 
For example, you can returning a list of the values. This return a collection of ImportColumn [[Tuple]]<nowiki/>s
ImportColumn.allInstances
Converting this to a list of strings for each Enum value (for example to be used in a list on screen)
  ImportColumn.allInstances.asString
  ImportColumn.allInstances.asString
Select an enum value from the list, then getting the string value from that
Select an enum value from the list, then getting the string value from that
  ImportColumn.allInstances->select(ic|ic = #JournalName).asString
  ImportColumn.allInstances->select(ic|ic = #JournalName).asString

Revision as of 10:05, 23 March 2020

Defining enumerations.png

The defined enumeration is a class in the model's typesystem.

For example, you can returning a list of the values. This return a collection of ImportColumn Tuples

ImportColumn.allInstances

Converting this to a list of strings for each Enum value (for example to be used in a list on screen)

ImportColumn.allInstances.asString

Select an enum value from the list, then getting the string value from that

ImportColumn.allInstances->select(ic|ic = #JournalName).asString
This page was edited 98 days ago on 02/10/2024. What links here