Expand my Community achievements bar.

SOLVED

Script doesnt work

Avatar

Former Community Member

Hi,

I am trying to hide a table on a button click. I wrote the following FormCalc code in the event Click of the button. But it doesnt work.

form1.purchaseOrder.main[*].presence = "hidden"

main is the table in the subform purchaseOrder.

(button and the table are in different subforms)

I opened a sample tutorial and pasted the same code. It works there, but not in my new form. I checked both the subform settings, they are same.

Am I missing something? Please advise.

Charli

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Charli,

First, the form should be saved as a dynamic form to enable visibility changes to objects. Second, something got messed up with the table definition. I deleted your table and re-added a default table at the same position and the table now becomes hidden when you click the button.

I replied to your email with the updated form.

Steve

View solution in original post

6 Replies

Avatar

Former Community Member

Try

form1.purchaseOrder.main.presence = "hidden"

Steve

Avatar

Former Community Member

Charli,

Send me the form at stwalker.adobe@gmail.com and I will take a look.

Steve

Avatar

Correct answer by
Former Community Member

Charli,

First, the form should be saved as a dynamic form to enable visibility changes to objects. Second, something got messed up with the table definition. I deleted your table and re-added a default table at the same position and the table now becomes hidden when you click the button.

I replied to your email with the updated form.

Steve

Avatar

Former Community Member

Thanks for your quick solution Steve. The problem is I am not saving the form as "Dynamic". Thank you very much.

Charli.

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] ----