Expand my Community achievements bar.

SOLVED

Tracking Of File Import/Export Process.

Avatar

Level 2

Hi Team / Vipul RaghavAmit_Kumar

I am working on creating a separate schema in which we are loading Import/Export workflow's data.

In that schema, Fields are Like  Date&Time, Count(In file), Successful (Inserted/Updated), Unsuccessful()Reject.

Can you please help me with that JS which will capture Successful and Unsuccessful  Counts after Updating or Rejecting data in Update activity of workflow . So, that I can use it for Updating Our Tracking schema with that.

Regards,

Sourabh Kumar

1 Accepted Solution

Avatar

Correct answer by
Level 10

you can use vars.filename for filename.

View solution in original post

8 Replies

Avatar

Level 10

Hi Sourabh ,

It's a two-step process

Step 1: Enable success and reject from update data activity(this will work for CRM export activity as well)

Use the following screen for the reference.

1411912_pastedImage_1.png

Step2:  Use vars.recCount or vars.insertCount & vars.updateCount to get the count of records, you can use this variable to do whatever you want to use it for.

Example logInfo("successfully inserterd or updated records: "+vars.recCount);

1411931_pastedImage_2.png

Hope this helps!

Amit

Avatar

Level 2

Hi Amit_Kumar

Thanks for Help!

Can you please help me how to capture Filename? 

Regards,

Sourabh kumar

Avatar

Correct answer by
Level 10

you can use vars.filename for filename.

Avatar

Level 2

Thanks Amit

I have one more doubt If I had checked Generate outbound transition of success and Reject . Then whats the keyword in JS that we will Use in Advanced of Update data activity

1411978_pastedImage_1.png

Thanks A lot

Regards,

Sourabh

Avatar

Level 10

I am confused with this question, what do you mean by "Advanced of Update data activity". can you explain this and please use a screenshot from your workflow.

Avatar

Level 2

Thanks for Help !

Let me explain you my requirement.

I had created a Schema that will hold all data we will generate from Workflow failure/Success/Filename/Updated count/Successful/Unsuccessful count.

So based on Update data in Data table I am updating that schema table with workflow log (newly created).

1412081_pastedImage_0.png

Now this is my Schema ss in which I am loading data

1412082_pastedImage_1.png

Thanks for your Help!

Reagrds,

Sourabh Kumar

Avatar

Level 10

Hi Sourabh,

build your workflow like this:

1412194_pastedImage_3.png

1412211_pastedImage_0.png

1412221_pastedImage_1.png

use above instance variables to update final update for success and rejected.

You can add your remaining code success js and use in an update.

Regards,

Amit

Avatar

Level 2

Hello Amit_Kumar​.

Thanks for your Kind help!

Now I had created everything

1412564_pastedImage_0.png

1412566_pastedImage_2.png

Its Loading all required data in table. But Again I am facing some problem and that is

I have to load single data like I had loaded a File data inserted to this export log table is 1 Record of that with file name and like record have 25 data Successful is 24 and rejected is 1.  Only one data should be Inserted Like this. I think I am missing some thing.

Regards,

Sourabh Kumar