0
We have a very complex transition form with about 120 fields. We'd like to do incremental updates on the item (i.e. save current values to the dB) as the user moves from section to section on the form. This is so to prevent the user from "losing" data if their connection is interrupted or they're distracted and the system "times out". Experience has shown that the users most likely won't do things in a sequential order.

I can't see anything in the JSON API that would help. Any ideas? At this point I'm thinking I might have to break the SUBMIT transition into multiple transitions that "chain" each other.
Responses (4)
  • Accepted Answer

    Monday, September 17 2018, 05:44 PM - #Permalink
    0
    Sorry - my only suggestion would be to go with your first thought. "Chain" a number of states together as part of the submit process. That's how I have approached it in similar circumstances.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 19 2018, 03:59 AM - #Permalink
    0
    Paul Thompson wrote:

    We have a very complex transition form with about 120 fields. We'd like to do incremental updates on the item (i.e. save current values to the dB) as the user moves from section to section on the form. This is so to prevent the user from "losing" data if their connection is interrupted or they're distracted and the system "times out". Experience has shown that the users most likely won't do things in a sequential order.

    I can't see anything in the JSON API that would help. Any ideas? At this point I'm thinking I might have to break the SUBMIT transition into multiple transitions that "chain" each other.


    Just for brainstorming...

    Start of Concept

    I would suggest creating a aux table(Maybe call this table field change log?) for this requirement

    This table structure should be like
    [Table Field Name, Content, Primary Table Record Id]
    -----------------------------------------------------------------------
    ["Have you completed xxx?","Yes", 15 ]
    ["Have you completed xxx2?","No", 15 ]



    then on the form you continuously send ajax call to create record using event listener (When xxx changes/.....)


    So, post Transition action should be to delete those record
    and pre-transition should be taking those field value change record from the database.


    End of Concept

    [my idea sound terrible actually]
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 31 2018, 06:55 AM - #Permalink
    0
    That is an intriguing challenge. I guess I'd be inclined to present the fields in the order you want them filled in and hide the others until appropriate, but that doesn't really help you with the incremental save, though. I guess I would consider breaking this into a sub-task workflow with a bunch of states to act as "save" checkpoints and then, once all states have been passed, use a script to copy the sub task fields to the parent. Admittedly, this sounds gruesome, too. :-)
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 08 2018, 11:52 AM - #Permalink
    0
    My idea for this is a series of transitions, each from the starting state and ending in the starting state, with a post-transition ModScript on the transition that redirects the user to the next transition (using whatever logic you need to use to determine the next transition). When the ModScript determines that all transitions are complete, rather than a redirect, it simply changes the State field to the desired ending field (alternatively, you could have the ModScript execute a transition to move the item to the next state when all transitions have been completed). This will only work for users running transitions on a browser, not for webservices, jsonapi, or other methods of invoking transitions.

    To do this, in the ModScript, set Shell.RedirectURL() = "tmtrack.dll?shell=swc&ViewForm&TransitionId.58=Add+Reviewer&TableId=1003&RecordId=17&ProjectId=4&ReportId=0".

    The URL should include the transition TS_ID after the "TransitionId." and before the "=", and the transition name after the =. The item's TableId, RecordId, and ProjectId will be required, and ReportId should remain as 0.
    Like
    • Paul Thompson
      3 weeks ago
      Thanks Don. I'll give it a try. I'm assuming AppScript would work as well as Mod ?
    • Don Inghram
      3 weeks ago
      Yes, AppScript will work too.
    The reply is currently minimized Show
Your Reply

Recent Tweets