Skip to main content

Hi,

 

I am using SQL server to create my smart objects and I am creating an application where I have an editable list and once I click create after adding all the entries, the individual records get stored to the database. Once the records, get created , it triggers the workflow which sends email about the requests to the manager. My requirement is that , once I click on create button, eventhough I have multiple records in my editable list (with each being saved as a unique record), I would like to bundle all these records into a single record (email or request) and send that single reuest to the manager (containing multiple line items (records) that can be actioned by clicking appropriate links) rather than sending individual request for each record. Is there a possibility to achieve this? If so, can anyone help me with this issue?

 

Regards,

Sami. 

So just brain storming this, I would add some sort of additional column in my table that is something like session ID or batch ID to identify all the records as being part of the same effort. This introduces a concept by which you can do work on the records as a group instead of treating them as individual records.

 

For the new adds to the editable list, you can us a for condition to loop through the new records in the list and save them to your data source. Your action to start the workflow would be outside of that loop so it would happen once when the loop finished. You would be sure and pass that session ID into the process.

 

Before the loop you can make some sort of call to a session table, where you can do a create single record with something like user id, date time and maybe process id where you can do an insert before you start the loop to get a unique value to use as the session ID. Also, you can later have the process update that table with the process id to give you some traceability with reporting matching up records to process.

 

Hope this spurs some thought, Let me know if you want me to clarify any of that I realize this was a pretty high level run through, but what you are wanting to accomplish is very doable.

 

S.


Reply