Help with temporary list

Hi all,

My user’s need to add tasks, before they commit the task to the database, they should be able to add “task items” to it.

I can’t quite figure out how to allow the user to create a list of task items, before then hitting “Save” to commit the task, and the task items to the database.

For context, “Task Item” is a child of “Task”.

The task items are in a repeating group because there could be multiple.

Played with custom states but didn’t get very far.

1 Like

Ultimately the purpose is to save a task to the database, but before doing so, the user needs to be able to add items to it. I figured the best way to do that would be to add the task items to some sort of temporary list, and when they hit save, the temporary values are committed through a “create thing”.

Hi there, @jamie.robson.89… you likely have options that involve local storage or multiple custom state lists, but if I was doing what you described, I would probably create the task items in the database when they are added, and I might use a custom state to hold the list of newly-created task items. Then, when the save button is clicked, create the task and associate the list of task items in the custom state with the newly-created task. If the cancel button is clicked, delete the list of task items in the custom state.

I’m not sure if what I suggested is the most efficient way to go in terms of workload units, but I’m guessing that creating the items on the fly (and possibly having to delete them) wouldn’t be much (if any) worse than having to loop through a list of temporary task items to create them in the database.

Hope this helps.

Best…
Mike

I have done something like this with an extra field in the Task items table as "Saved(Yes/No) ". Initially it’d be set to No and it’d be set to Yes only on the Save button workflow. We display only the task items with Saved=yes in repeating group.

Ah yes, got ya!

thank you!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.