Custom functions for rule editor is adding an extra ; after function call...

Avatar

Avatar
Validate 1
Level 2
rahulpandey0102
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
rahulpandey0102
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
rahulpandey0102
Level 2

03-01-2018

Hello,

I am new to AEM forms and trying to write custom function for the rule editor.

I used my clientlibs category to add the custom functions.

Now problem is this when I call a custom function from the rule editor (visual mode). it generates a code of function call where we can see an extra ; add after the function call.

e.g.

if my function is -

function callme(){

               return "any value" ;

}

then in rule editor i tried to call this for comparing the value-

now code generated by the rule engine looks somthing like this-

if(callme();=="some value"){

true;

}else{

false;

}

I need to know is there any specific jsDocs which can avoid this extra ; from the function call

Replies

Avatar

Avatar
Boost 1
Level 2
Anish_Somani
Level 2

Like

1 like

Total Posts

19 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 1
Level 2
Anish_Somani
Level 2

Like

1 like

Total Posts

19 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile
Anish_Somani
Level 2

04-01-2018

This seems like a issue. Meanwhile, You can use the workaround and remove ';' through the code editor.

Avatar

Avatar
Validate 1
Level 2
rahulpandey0102
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
rahulpandey0102
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
rahulpandey0102
Level 2

04-01-2018

For now i am doing the same work around but if we use OOTB functions that time it does not append extra ; . So i was just wondering how these functions are implemented. Not able to locate the clientlib which contains the OOTB functions.

Avatar

Avatar
Boost 1
Level 2
Anish_Somani
Level 2

Like

1 like

Total Posts

19 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 1
Level 2
Anish_Somani
Level 2

Like

1 like

Total Posts

19 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile
Anish_Somani
Level 2

04-01-2018

OOTB functions are not added through clientlib. Hence, not visible to you.

Please reach support team to log a bug (RFH) for this.