Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

How do Document Triggers really work?

I have a trigger that I have set for OnOpen in the Document Triggers that should give me the most current period as the default.

It is coded as =max(PERIOD)

It is not working.

The document always opens with the Period 201412 even though the latest period is 201512.

When the document was saved before being published 201412 was the choice.  So it appears that something overrides the trigger.

The above is happening on my copy in development.

I am not getting the expected results on the Portal either.

So can someone hopefully explain what I might be doing wrong or if this is how it works?

Thanks

4 Replies
pokassov
Specialist
Specialist

Hi!

It looks strange you write Period and PERIOD. Are they the different fields?

13.png

Not applicable

On opening can add a trigger to clear all selections, before applying the new selection.

Action Type:  Selection

Action:           Clear All

Regards

jerrysvensson
Partner - Specialist II
Partner - Specialist II

OnOpen trigger doesn't (always) work in Ajax. If you are using Ajax as client and not plugin this could be your problem.

gradiske
Contributor III
Contributor III

After so many tries with document/sheet/field and variables triggers, i found a way to make this thing work.

Here's what i did.

Create a variable, ex: vOnOpen (set 0 or something else, it doesn't matter at this point)

At Document Event Triggers, OnOpen

Add a action to change the variable.
Something like
if(vOnOpen='1','0','1')

Now, on variable event trigger, choose vOnOpen and then add a OnChange Action
Here's where you put all the triggers you want.

It's weird, but for me, its working.