SHARE
TWEET

Untitled

a guest Nov 19th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     const createdResults = await Promise.all([staffArray, jobsArray])
  2.  
  3.     var appenateStaffRows = []
  4.     var appenateJobRows = []
  5.     for(let a = 0; a < createdResults[0].length; a++) {
  6.         appenateStaffRows.push(new Array(
  7.             createdResults[0].id, //ID
  8.             createdResults[0].field_2, //Name
  9.             createdResults[0].field_3_raw.email, //Email
  10.             createdResults[0].field_50_raw.formatted, //Phone
  11.             createdResults[0].field_21, //Pin
  12.             createdResults[0].account_status, //Status
  13.             createdResults[0].field_189 //Workflowmax ID
  14.            
  15.         ))
  16.         for(let b = 0; b < createdResults[1].length; b++) {
  17.             //TODO
  18.             // createdResults[1].id
  19.             // createdResults[1].id
  20.             // createdResults[1].id
  21.         }
  22.     }
  23.     await appenate.createOrUpdateRecords('f680e632-127a-4267-b868-ab0a000927e8', appenateStaffRows)
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top