How to do iterate the workflow for each id

maheswarik23685

01-03-2019

Hi All,

I need to send all customers specific to id from table A.

Table A - has 500 records with unique Id .I need to send one file specific to each Id with corresponding recipients (I need to send 500 separate files ,each file with recipient details belonging to that Id)

Recipient table not linked with Table A.

Recipient table linked with Table B. Table B linked to Table A using Id

For each iteration of workflow I need to send one file with their recipient details

Can anyone provide inputs how to proceed in this case..

I used below logic but it fails when there is no record specific to id in Table B

I have created custom field processed in Table B so that after sending each file to SFTP we update that id  processed equal to "Yes"

Q1- query all id from Table A .

split- I queried records from temp table based on Processed equal to No(which is default value to all records ,initially I am updating it manually to all records) .I have applied ascending sorting based on id. Limited to 1.

I used test activity if record greater than 0 .I used Js, in that I am storing that 1 id in a variable

Q2- I am querying from Table B by  passing that variable so that I will get recipients specific to that Id

After that I am extracting data and sending to SFTP once its done I am updating that id's processed value as yes

My issue is when no recipient are present in Table B for that id its not updating processed to yes.

I am getting one more error in update activity

PGS-220000 PostgreSQL error: ERROR:  could not extend file "base/16390/975424.55": No space left on device HINT:  Check free disk space.

Can anyone suggest how to fix this issue and how to implement such logics?

Thanks,

Accepted Solutions (0)

Answers (0)