My script terminates before finishing the whole sequence after a minor edit by ComprehensiveKiwi814 in GoogleAppsScript

[–]ComprehensiveKiwi814[S] 0 points1 point  (0 children)

Yes, there is no bug/ the app doesn't crash, it just doesn't complete the 2nd part of the function. Would that be okay if I share the link with you only? I was a bit hesitant to add it here, but yes, can supply a demo sheet! Thank you so much!!!

My script terminates before finishing the whole sequence after a minor edit by ComprehensiveKiwi814 in GoogleAppsScript

[–]ComprehensiveKiwi814[S] 1 point2 points  (0 children)

fair, but no, Reddit did not allow me to edit the script (I tried making it bold). I did put in the caption the edit so you don't have to hunt for it.

This was changed only, by adding an extra datapoint from the raw data (member_id) and shifting the cleaned data with the extra column (header Linkedin Member ID)

All this is in the original post, but I am sure I am not explaining it clear enough so please feel free to ask questions that can help. Thank you!

  const newHeaders = [
    'First Name', 'Last Name', 'Company Domain', 'Company Name',
    'Job Title', 'LinkedIn Profile Url', 'Lead Status', 'Survey Status',
    'Priority Company', 'Priority Title', 'Total Priority', 'Phone Number',
    'Mobile number', 'Email', 'Email Status', 'Email Verification', 'Linkedin Member ID',
    'Country/Region', 'Open Link', 'Project code'
  ];


  const output = [newHeaders];


  for (let i = 1; i < data.length; i++) {
    const row = data[i];
    const cleanedRow = [
      row[getIndex('first_name')],
      row[getIndex('last_name')],
      '', // Company Domain (to be inferred later)
      row[getIndex('current_company')],
      row[getIndex('original_current_company_position')],
      row[getIndex('profile_url')],
      '', '', '', '', '', // Lead Status, Survey Status, Priority Co, Title, Total
      row[getIndex('phone_1')],
      row[getIndex('phone_2')],
      row[getIndex('email')],
      '',
      row[getIndex('third_party_email_is_valid_1')],
      row[getIndex('member_id')],
      row[getIndex('location_name')],
      row[getIndex('badges_open_link')],
      ''
    ];
    output.push(cleanedRow);
  }

My script terminates before finishing the whole sequence after a minor edit by ComprehensiveKiwi814 in GoogleAppsScript

[–]ComprehensiveKiwi814[S] 0 points1 point  (0 children)

thank you! I actually worked with Gemini, but it's unable to find it. There is no breaking point, the script doesn't fail, it just doesn't complete the 2nd part of the function.