Skip to main content
Question

Aurena BUG: Enumeration with Multiselect

  • July 13, 2022
  • 3 replies
  • 542 views

InfFilipV
Hero (Partner)
Forum|alt.badge.img+12

Hi,
I have issue related to BUG 154940 (from 23.7.2020) what is still unsolved.

// we need to add a text field for enumeration field since there is a bug to send value of multi select enumeration values to plsvc function.

Examples in CORE are from files:
\crm\model\crm\BusinessOpportunityPipeline.client
\crm\model\crm\BusinessOpportunityPipelineHandling.projection
\crm\source\crm\database\BusinessOpportunityPipelineHandling.plsvc

IFS Developer Studio 22.1.8682
IFS Cloud 22R1 SU3

 

Scenario:

I want to create Dialog with one field - Multiselect Enumeration. Enumeration is created in projection. Default options are checked by current company. On OK button is executed some process.

Problems:

  1. Structure attributes ignore parameters default and fetch so default values must be fetched in command and provided as input parameters to dialog
    •  

  2. Multiselect Enumeration field default value must be provided in whole structure otherwise framework does not know correct datatype (array vs. enumeration)
    •  

  3. Default values for multiselect enumeration must not be done as Text_Arr but as VARCHAR2 in Enumerate form - separated with ^ eg.: BS2016^BS2018^
  4. There is no way how to call function with multiselect enumeration 
    1.  
      • Error - Unexpected token B in JSON at position 0

      • StatementIds@odata.type should be #Collection(IfsApp.CCsFinStatementsHandling.CCsFinStmntDef)

    2.  

      • ​​​​​​​
         
      •  

  5. There is no way how to convert value of multiselect enumeration to text in command 

    • stringify is not usable for Enumeration (Error - Cannot read properties of undefined (reading 'map')

    • IDK about any property of field to extract value as text

BUG 154940 solution / workaround:

In this BUG is used Assistant, value of multiselect enumeration is saved to database and in CRUD_Create/CRUD_Update/.. is its value copied into another attribute of text type. in Next step is called Action with usage of value of this Text field.

 

I don’t think this is good workaround, there must be some way, how to solve it in command

I will try to implement it via query and itempicker or bunch of checkboxes… But it means use something else then enumeration.

Do you know about any another workaround? Better documentation to command possibilities? Knowledge about BUG solution?
Thanks
BR

3 replies

hamalk
Superhero (Employee)
Forum|alt.badge.img+14
  • Superhero (Employee)
  • July 18, 2022

tagging @Masheesh :  issue related to BUG 154940


CallumW
Superhero (Partner)
Forum|alt.badge.img+16
  • Superhero (Partner)
  • February 23, 2026

Hi,

Appreciate this post is over 3 years old, however I am also experiencing frustration in this area also, wanting to pass the values to a function. But alas haven’t found a way.

 

I wondered if you found a solution/ workaround?

Thanks, Callum


InfFilipV
Hero (Partner)
Forum|alt.badge.img+12
  • Author
  • Hero (Partner)
  • February 24, 2026

Hi ​@CallumW,
I used ItemPicker instead…

 

dialog CCsFinStmntRecDefDlg for RecreateDefinitionStruct {
label = "${context.Company} - (Re)create Default Statements Definitions";
input(StatementIds);

group {
itempicker StatementIds using DefStatementIdsSet {
required = [true];
displayvalue = StatementId;
enableordering = [true];
}
}
command DlgRecDefCmd {
enabled = [isValid];
}
}


//command
call RecreateDefinitions(context.Company, StatementIds);

//convert from itempicker value to multiselect value
PROCEDURE Recreate_Definitions___ (
company_ IN VARCHAR2,
statement_ids_ IN VARCHAR2)
IS
definitions_ VARCHAR2(32000);
BEGIN
Assert_SYS.Assert_Is_Not_Null(statement_ids_, 'STATEMENT_IDS');
definitions_ := SUBSTR(statement_ids_, 2, LENGTH(statement_ids_)-2);
definitions_ := REGEXP_REPLACE(definitions_, '"STATEMENT_ID=([^\^]+\^)"', '\1');
definitions_ := REPLACE(definitions_, '^,', '^');

//...
END Recreate_Definitions___;