Expand my Community achievements bar.

master page scripting

Avatar

Former Community Member

Hi experts,

I have the following requirement - can you provide a sample solution for the same -

I have two Master Pages say MP1 and MP2 – (created because logo alignment is different in the two setups)

I have restricted the MP1 occurrence only to the first page.

Now in both the master page I have 2 suforms say sub1 and sub2.

I have check field, say presence_indicate –

The pseudocode goes like this –

If <presence_indicate>.isNull

            Sub1.presence = “hidden”

Else

            Sub2.presence = “hidden”

In short, if presence_indicate.rawValue = Null, then sub2 subform should be displayed in all the master pages MP1 or MP2.

Thanks,

Rohit

2 Replies

Avatar

Former Community Member

I am not sure I follow your logic but is the attached what you are after?

Steve

Avatar

Former Community Member

Hi Steve,

Thanks for your reply -

to make things bit clearer, the no. of Pages is dynamic and has to be determine at runtime.

- do we need to use resolveNode method to get the exact page no by calling the pageCounr( ) method and running the visibility logic in a loop.

In short, can you modify the example by say, putting a repeatable subform in the Design Layout and a button to add the rows so that we need to get the no of pages at runtime.

The rest of the things are working fine - the requirement is to restrict the occurence of the 1st Master Page also.

Thanks and Regards,

Rohit