Jump to content

Get merge field value


rob

This topic is 3771 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a merge field as a button.  It is a repeating field individually and the button name is the result.  It works fine.

 

But I need to find out which button is clicked and its repetition number tells me that.  I tried using Get(Repetition) and Get(CalcRepetition) and GetLayoutAttribute and a few other things even passing parameter of Get(ActiveFieldContent) but nothing so far works.  I suppose I could go back to the regular fields as the buttons but I did a lot of work already.  Also I would like to know for next time any way.  I see the field name and value quite clearly but how to get them?

 

Thank you for reading.

Link to comment
Share on other sites

I worked on this over four hours before posting and now i think I know how.

 

I can just put a 1 in the script parameter for the first repetition and so on.  But is that the best way?  I guess if it works it is good but that does not mean GOOD.

Link to comment
Share on other sites

I can just put a 1 in the script parameter for the first repetition and so on.  But is that the best way?

 

Yes. When you turn a field (merged or not) into a button, you click the button, not the field. The field itself does not activate and there is no way to get anything from or about it.

Link to comment
Share on other sites

Yes. When you turn a field (merged or not) into a button, you click the button, not the field. The field itself does not activate and there is no way to get anything from or about it.

 

But you could make the (non-merged) field repetitions enterable and use an OnObjectEnter trigger to get the repetition with Get ( ActiveRepetitionNumber ).

Link to comment
Share on other sites

This topic is 3771 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.