Undefined number of parameters in a custom function | Community
Skip to main content
New Participant
Aug 17, 2021 4:24 PM UTC
Solved

Undefined number of parameters in a custom function

Hello,

 

Got a question about custom functions as I am trying to achieve something. 

I have a custom function defined with a fixed number of parameters and I am trying to create the possibility for the author to add as many fields as parameters in the rule editor. Is there a possibility for me to accept an undefined number of arguments?

 

I was searching through the documentation here: https://experienceleague.adobe.com/docs/experience-manager-64/forms/adaptive-forms-advanced-authorin... and found a snippet saying:

 

"Allowed parameter types are:

  1. string
  2. number
  3. boolean

All other parameter types are categorized under one of the above. None is not supported. Ensure that you select one of the types above. Types are not case sensitive."

 

This kind of makes me believe parameters cannot be arrays, but wanted to make sure.

I am using AEM 6.5

 

Thanks,

Daniel

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
dpomeanuAccepted solution
New Participant
Aug 19, 2021 7:59 AM UTC

Thanks, we will stick to fixed properties for now then.

Have a good one,

Daniel

2 replies

Pulkit_Jain_
Employee
Aug 19, 2021 7:03 AM UTC

@dpomeanu 

I checked with Product Engineering on the roadmap to support array type parameters in the Rule editor. Not supported currently but it's being worked upon so you may see this use-case implemented in future releases.

Hope this helps!

Translate
dpomeanuAuthorAccepted solution
New Participant
Aug 19, 2021 7:59 AM UTC

Thanks, we will stick to fixed properties for now then.

Have a good one,

Daniel

Translate