How can we improve TrackVia? What features should come next?

Application Script Help...

I am finding the information on Application Scripts to very limited.
I want to capture currentvalue from a parent table in order to retain historical data, but I am unclear on which type of field to capture this data. ..or even types of fields/data I can pull from. According to the videos, I think that I need something like this:
def x = ["field within current table"]
x = currentvalue["Relationship name to parent"]["field name of parent"]

Am I missing something???

2 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Michael shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Justin Mauldin commented  ·   ·  Flag as inappropriate

    Hi Michael,

    Thank you for reaching out to us with your question.

    Per our phone conversation a little bit ago, we were able to identify that you are trying to reference a Calculated Field in your App Script and Calculated Fields cannot be referenced in App Scripts. Also, you need to do a "Before Insert" instead of "After Insert" event.

    Also, since you can't reference Calculated Fields, you will need to reference the field in your grandparent table directly in the App Script.

    Finally, a great resource for learning how to write the correct syntax of App Scripts in the Groovy language for your functions you are wanting is the website: http://groovy-lang.org/syntax.html.

    Thanks again,

    Justin

Feedback and Knowledge Base