Build an App with Speech Synthesis and Recognition

1
How can I change an object in nanoflow from enumeration to string?          
asked
2 answers
0

You can use getCaption($yourenum) to get the caption of an enum as a string.

answered
0

The simplest solution without java code would be to check the string in an if-else statement.

For instance if you have a module named Portal with enumeration Country, your enumeration values could be:
Portal.Country.Netherlands
Portal.Country.Belgium
Portal.Country.Germany

so the snippet in the editor can be written as such:

 

if $Country/Name = 'Netherlands' then
  Portal.Country.Netherlands
else
  if $Country/Name = 'Belgium' then
    Portal.Country.Belgium
  else
    Portal.Country.Germany

 

answered