Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Setting a table column to enabled by button

Avatar

Level 3

Hello,

I am trying to set the function for a button to enable a table column of text fields to enabled.

The table has an add row function and the table column text fields are set to protected by default to avoid users changing the content.

I know how to set the individual fields to enabled if they exist upon opening.

I am looking for a method to change the entire column to enabled which would affect the existing fields and any newly created table rows.

Does anyone have a method to achieve this?

I have the before close event set to protect the individual table column text fields so an admin can add modify exisiting through a password field, however, I don't know how to affect added rows which have protected field values.

Please provide any information in order to achieve this function.

I am using ES2.

Thank you in advance.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

This will require that you write a for loop starting at 0 and ending when the number of rows is reached. Each time the loop increments your expression to lock/unlock the field(s). If you send you form to LiveCycle8@gmail.com I will show you what I mean. Make sure you include a description of the issue as there is no corelation between that email and this forum.

Paul

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

This will require that you write a for loop starting at 0 and ending when the number of rows is reached. Each time the loop increments your expression to lock/unlock the field(s). If you send you form to LiveCycle8@gmail.com I will show you what I mean. Make sure you include a description of the issue as there is no corelation between that email and this forum.

Paul

Avatar

Level 3

Are you able to post the sample script?


Avatar

Former Community Member

It will make no sense without using your form structure .....

Paul

Avatar

Level 3

Okay, sending the file to your email address.


The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----