TrackVia API & App Scripts

How to access and use TrackVia's API or Application Scripts?

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. missing javascript in JavaScript in API-WebForm-master

    I just downloaded the WebForm SDK, and it appears the form.htm file is trying to reference a script:

    /scripts/trackvia.js

    - but no such file is supplied.

    1 vote
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      0 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
    • Sorting records in Application Scripts?

      It seems that sorting a List of records by a specific field requires the field value to be cast to the underlying data type? If you don't do that, it seems like the fields will sort by object identity or some other undesired key. Am I right about this?

      For example, if I have a date field in a record, must I use
      (Date)record["MyDateField"] to actually get a correctly sorting date.

      1 vote
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
      • What is update function for in application script?

        The application script docs describe an update function to update a record, but it seems that changing a field using the Map interface already updates the record. What is the update function used for?

        1 vote
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
        • Before/After Delete App Scripts: Do these work?

          It seems the before/after delete app scripts don't work the same way as the insert/update ones, but not 100% sure.

          I'm trying to prevent the user from deleting a parent record that has any child records from a certain table attached to it.

          The script should be pretty simple. On the parent table:

          Before Delete

          List childRecords = getChildren "TableName", "FieldName"
          if(childRecords){
          throw new RuntimeException
          }

          This hasn't worked whenever I've tried it. However I structure it, a Delete app script can't seem to find child records. I'm I misunderstanding something here?

          Thanks!

          1 vote
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            2 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
          • Trasport

            Transport service

            1 vote
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              0 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
            • Only find records in view that exactly match query string? /openapi/views/{viewId}/find

              We would like to know how we can either:

              1) ONLY find records in a specific view that *exactly* match our query string, and/or
              2) Find records by looking for our query string within a given FIELD within the specified view.

              With respect to #1 above we're running into some issues. For example, when searching for "John Doe - 123-456-7890" we ONLY want to find records that have our exact query string in a specific field within that view. But the TrackVia API is returning every record that has even one piece of our query string -- for instance, it's…

              1 vote
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                1 comment  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
              • Date Calculations in Apps Scripts

                This is probably a very simple solution, but I've been banging my head on this for two days.

                I need to populate a date field in a child table with a date stored in a parent record minus 14 at the time the child record is created via Apps Script. Not all child records link to the same parent table, and the child date field needs to be editable, so a calculated date field in the child table is not an option.

                I have attempted a calculated datesub in the parent to subtract 14 from the source field, then use…

                1 vote
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  2 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                • App Script Padding For Child Records Numbers

                  I've been practicing with Apps Scripts and creating multiple child records.

                  From the documentation (see below), each child record will be created and numbered incrementally from 1 to the total number of records created (1 to 5).

                  QUESTION: How do you pad the sequence number as 01, 02, 03... instead of 1, 2, 3.

                  This is so column sorting is correct when more than 10 records exist.

                  Thanks

                  How do I create child records ?

                  // Create 5 child records
                  (1..5).each {
                  addChild “Child Table”, “Link to Parent”, [‘Status’ : ‘Active’, ‘Index’ : it ]
                  }

                  1 vote
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    2 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                  • Can Apps Scripts Populate Link-To-Parent Fields?

                    I am trying to populate a Link-To-Parent fields via Apps Script and nothing happens.

                    If copied the format from Drop-down fields, Application User, and Application User Group fields (thinking they would all behave the same), but although the Scripts saves with no errors, and the records can be updated with no errors, the LTP field is not being populated.

                    If this is possible, can you provide a sample of the code that I can use?

                    3 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      4 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                    • List of Fields used in App Scripts

                      It would be good to have a list of fields used in application scripts. So that if a table is changed and field name updated it is easy to identify what App Scripts will need changing as well.

                      Best case scenario would be that the field renames flow into and change the app scripts like they do in calculated fields in tables.

                      3 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                      • getChildren function

                        Regarding the getChildren function described in the app scripting documentation - I think it lacks some info. How do you use it properly?

                        getChildren "child table name", "link to parent name"

                        it's not only not working, but it doesn't make any sense: how would trackvia know which parent I am referring to if I only specify the link name, but not the value?

                        for reference, this is what is written in the docs:
                        Function: getChildren
                        Description: Get the associated child records.
                        Arguments:
                        Name of the child table
                        Name of the relationship
                        Returns:
                        List of found child records
                        Example:

                        List childRecords…

                        1 vote
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          1 comment  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                        • Finding records within a certain time interval

                          Is there a way to find records in a table via scripting that have a date column value greater than a value (as opposed to just equal to it as the method seems to work now)?

                          1 vote
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            1 comment  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                          • create an api for an excel spreadsheet?

                            I want to pull XML data from trackvia for the purpose of working with live views in an excel spreadsheet.

                            1 vote
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              1 comment  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
                            • Which field types are not supported by app scripts? Can we change this?

                              I was already aware that app scripts are unable to handle image/document fields(bummer), but it appears they may not support other calculated field types as well... some clarification on the subject would be nice. I would think you might want this published on your developer site as well.
                              Thanks!

                              1 vote
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                1 comment  ·  App Script  ·  Flag idea as inappropriate…  ·  Admin →
                              • Add user last login date/time to get_users()

                                Can you add the user's last login date & time to the get_users() method please?

                                3 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  0 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
                                • "Wrong data type provided for input." 400 error.

                                  Hi,

                                  I was unable to use the following API end points

                                  GET /openapi/views/123/records/12/files/message

                                  It returns "Wrong data type provided for input." 400 error.

                                  1 vote
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    1 comment  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Wrong data type provided for input.

                                    Hi,

                                    I was unable to use the following API end points

                                    GET /openapi/views/{viewId}/records/{recordId}/files/{fieldName:.+

                                    It returns "Wrong data type provided for input." 400 error.

                                    1 vote
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      2 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
                                    • .Net, C#

                                      Do you have a .net, c#, vb.net sdk?

                                      2 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        2 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Supply sample JSON data for operations

                                        Something that might be helpful is to link to sample Json data (request and response) for each method. This would help greatly to make sure we are posting the correct Json structure.

                                        Not a big deal, but I'm running into issues with my Json serialization that I'm sending to create records and I believe it's the structure that's incorrect. It would be nice to check against.

                                        8 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                        • 1 vote
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1
                                          • Don't see your idea?

                                          TrackVia API & App Scripts

                                          Feedback and Knowledge Base