Workflow question

keshav77
Tera Contributor

Hi All 

In workflow is that possible to check the upcoming data for table is updating or creating data then move a flow forward for example data come through MRVS if we need to check first that is for updating or creation if that for creation the move for approval or if for updating then move another run script that will update. better example  data enter in mrvs then in workflow in run script we glide (cmdb_ci_api) table to see this is for update  or creation if it is for update then how move root of run script forward similar for create 

 @Ankur Bawiskar   can you help me with this 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@keshav77 

how is your catalog item determining if create/update is to happen?

Are you having a variable for that?

if yes then you can use that in your flow IF logic

we don't know what your form looks like?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

there is no variable which will let us know  if we are creating or updating I am using workflow on catalog where I want first to add runscript which will check whether we need to update and created the data. if we need to create then I want to pass the roots of the flow towards approval and if it is update then I will pass towards another runscript which will update the record.. how I can do that this is MRVS catalog. I cannot use workflow.scratchpad  as it will hold only the values of single row

@Ankur Bawiskar  Can we do that 

@keshav77 

you can use workflow run script and query the respective fields on table.

If record exist then don't create

If not then create

You can parse the MRVS json and iterate and check

see this how it can be done

How to create records in a table from MRVS? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader