custom function for the rules editor

Avatar

Avatar

joell91868939

Avatar

joell91868939

joell91868939

06-03-2017

I tried creating a custom function for the rules editor using the doc example, but the side panel didn’t contain the functions:
https://helpx.adobe.com/aem-forms/6-2/rule-editor.html

Do I need to initialize it? There is a  some form of hook that is missing here…

Replies

Avatar

Avatar

PriyankP

Avatar

PriyankP

PriyankP

06-03-2017

You can create a client-lib for your adaptive form and create a custom js file. Once you assign the clientLib to Adaptive Form, all the functions that you define within it should appear in the Rule editor. Please see my screenshots. 

Avatar

Avatar

PriyankP

Avatar

PriyankP

PriyankP

06-03-2017

You can create a client-lib for your adaptive form and create a custom js file. Once you assign the clientLib to Adaptive Form, all the functions that you define within it should appear in the Rule editor. Please see my screenshots. 

Avatar

Avatar

joell91868939

Avatar

joell91868939

joell91868939

06-03-2017

A client library has been created respectively but the issue I am having is that the custom function is not appearing on the touch UI rules editor sidebar. 

I used the following jsdoc sample:

"=============================="

var area;
//Some codes later
/** */
area = function(len) {
    return len*len;
};

"=============================="

but it is not working.

Avatar

Avatar

joell91868939

Avatar

joell91868939

joell91868939

06-03-2017

A client library has been created respectively but the issue I am having is that the custom function is not appearing on the touch UI rules editor sidebar. 

I used the following jsdoc sample:

"=============================="

var area;
//Some codes later
/** */
area = function(len) {
    return len*len;
};

"=============================="

but it is not working.

Avatar

Avatar

Anish_Somani

Avatar

Anish_Somani

Anish_Somani

06-03-2017

Hi,

1. Could you move the package to apps/ folder for once and try.

2. Is the client lib added to guideContainer property in AF authoring.

Please try this once. This should work fine.

Avatar

Avatar

Anish_Somani

Avatar

Anish_Somani

Anish_Somani

06-03-2017

Hi,

1. Could you move the package to apps/ folder for once and try.

2. Is the client lib added to guideContainer property in AF authoring.

Please try this once. This should work fine.

Avatar

Avatar

Love_Sharma

Avatar

Love_Sharma

Love_Sharma

06-03-2019

Posting for future reference. I faced same issue but when I hard reload my form editor, function appears. Also, if I change something in custom JS, function will disappear from dropdown. I again hard reload and it will show.