Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

What is function I get the current subform?

Avatar

Level 4

Hi.

Is there some function that return with the name of the subform current?

I tryed to find on the Help of LiveCycle, but I didn't find. I find out just currentPage, but it returns just the position of the page.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Rafael,

The name property can return the object name.

For example of you place a button in the subform, then the following in the click event will return the name of the subform:

app.alert(this.parent.name);

Hope that helps,

Niall

ps: Lashing rain here, hence at computer.

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

Hi Rafael,

The name property can return the object name.

For example of you place a button in the subform, then the following in the click event will return the name of the subform:

app.alert(this.parent.name);

Hope that helps,

Niall

ps: Lashing rain here, hence at computer.

Avatar

Level 4

Hi niall!

Perfect my friend! Exactly this! It works very well.

I am doing a pagination and I will share with you!

Thanks so much!!!!

Avatar

Level 4

Hi Niall.

Sorry up this post that already has a solution, but I found out a problem.

When de object is within of a table, it returns the name of line/table

Is there another solution?

Avatar

Level 10

No problem Rafael,

The script "this.parent.name" has the following components:

this = refers to the object that the script is in.

parent = refers to the container that the object is inside

name = the name of the specified object, in this case the container that the object is in.

Now you can extend this up the hierarchy until you get to the container that you want the name of. You can do this by adding more "parent" to the script, the number of parents will depend on how far up the hierarchy you need to go. This should get you closer:

this.parent.parent.name; 

Good luck,

Niall

Assure Dynamics

Avatar

Level 4

Hi Niall.

Your solution it works very well. For example: when the button is on the master page and I want to get the name of the subform that is within this MasterPage, it is possible?

Don't need to answer this question, it is just curiosity - I already found out a solution for this.