Highlighted
PM Thompson Outstanding Contributor.
Outstanding Contributor.
3702 views

Is it possible to do "incremental save" on an item in transition?

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.
0 Likes
6 Replies
dsheaffe Outstanding Contributor.
Outstanding Contributor.

Re: Is it possible to do "incremental save" on an item in transition?

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.
0 Likes
derekcc Absent Member.
Absent Member.

Re: Is it possible to do "incremental save" on an item in transition?

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]
0 Likes
jonesgf Absent Member.
Absent Member.

Re: Is it possible to do "incremental save" on an item in transition?

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. 🙂
0 Likes
dinghram Absent Member.
Absent Member.

Re: Is it possible to do "incremental save" on an item in transition?

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.
PM Thompson Outstanding Contributor.
Outstanding Contributor.

Re: Is it possible to do "incremental save" on an item in transition?

Thanks Don. I'll give it a try. I'm assuming AppScript would work as well as Mod ?
0 Likes
dinghram Absent Member.
Absent Member.

Re: Is it possible to do "incremental save" on an item in transition?

Yes, AppScript will work too.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.