Skip to content

Commit

Permalink
[email protected]'s change on OpenFn.org
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksa-krolls committed Apr 22, 2024
1 parent ae8cc11 commit b3bf90e
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions form-sharing/2-getSheetsList.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
getValues(
"1s7K3kxzm5AlpwiALattyc7D9_aIyqWmo2ubcQIUlqlY", //googlesheet id
"sheetsList of kobo forms!A:K",
state => {
const { koboForms, data } = state;
const [headers, ...sheetsData] = data.values;
const sheetsUids = sheetsData.map((row) => row[0]);
console.log("Ignoring headers", headers);
"sheetsList of kobo forms!A:K"
);

state.filteredKoboFormsData = koboForms.filter(
(form) => !sheetsUids.includes(form.uid)
);
fn((state) => {
const { koboForms, data } = state;
const [headers, ...sheetsData] = data.values;
const sheetsUids = sheetsData.map((row) => row[0]);
console.log("Ignoring headers", headers);

return state;
}
);
state.filteredKoboFormsData = koboForms.filter(
(form) => !sheetsUids.includes(form.uid)
);

return state;
});

0 comments on commit b3bf90e

Please sign in to comment.