• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

"Enable Feature" in Custom Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Enable Feature" in Custom Javascript

    I have a "feature" in my app (an icon column) that I hide/show in my rpgle program like this:

    setResponse('enableFeature' : 'myIcon');
    setResponse('disableFeature' : 'myIcon');


    Can I do the same in a custom javascript?

  • #2
    When you create features it should create an app variable that then you can set that to true or false to turn on/off the feature

    Comment


    • #3
      Does the new app variable share the same name as the feature? For instance, if my feature was named 'myIcon', then in my javascript, I could do this:

      setAppVar('myIcon' , true);

      and that would be the same as this in RPGLE:

      setResponse('enableFeature' : 'myIcon');

      Comment


      • #4
        A feature named myIcon would be an app variable of 'nabFeaturemyIcon'. You can see the feature app variables in the main app variables list.

        Yes, setting the app variable to true would do the same as enableFeature. Below is an example of feature app variable in the list

        Screenshot 2023-10-11 at 4.55.15 PM.png
        Last edited by Johnny Major; 10-11-2023, 05:09 PM.

        Comment


        • #5
          Thank you!

          Comment

          Working...
          X