Skip to content

Commit

Permalink
execute script hence create apps scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
janneadolf committed Oct 30, 2024
1 parent 21bfb50 commit faf35c0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/export/survey_experts/appsscript_dropdownupd.gs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function updateDropdown() {
var form = FormApp.openById('1UYmo21-_xtbU2kBImyPj2dCN15ut5bz5XC_GdMb8zJI');
var items = form.getItems();
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.getType() === FormApp.ItemType.LIST) {
if (item.getTitle() === 'Which species are you reporting for?') {
var itemUpd = item;
}
}
}

itemUpd.asListItem().setChoiceValues(['Acacia saligna | Acacia saligna (Labill.) H.L.Wendl.','Acridotheres tristis | Acridotheres tristis (Linnaeus, 1766)','Aedes albopictus | Aedes albopictus (Skuse, 1894)','Ailanthus altissima | Ailanthus altissima (Mill.) Swingle','Alopochen aegyptiaca | Alopochen aegyptiaca (Linnaeus, 1766)','Alternanthera philoxeroides | Alternanthera philoxeroides (Mart.) Griseb.','Ambrosia artemisiifolia | Ambrosia artemisiifolia L.','Ameiurus melas | Ameiurus melas (Rafinesque, 1820)','Andropogon virginicus | Andropogon virginicus L.','Arthurdendyus triangulatus | Arthurdendyus triangulatus (Dendy, 1895)','Asclepias syriaca | Asclepias syriaca L.','Axis axis | Axis axis (Erxleben, 1777)','Baccharis halimifolia | Baccharis halimifolia L.','Branta canadensis | Branta canadensis (Linnaeus, 1758)','Cabomba caroliniana | Cabomba caroliniana A.Gray','Callosciurus erythraeus | Callosciurus erythraeus (Pallas, 1779)','Callosciurus finlaysonii | Callosciurus finlaysonii (Horsfield, 1823)','Cardiospermum grandiflorum | Cardiospermum grandiflorum Sw.','Celastrus orbiculatus | Celastrus orbiculatus Thunb.','Cenchrus setaceus | Cenchrus setaceus (Forssk.) Morrone','Channa argus | Channa argus (Cantor, 1842)','Cortaderia jubata | Cortaderia jubata (Lemoine) Stapf','Corvus splendens | Corvus splendens Vieillot, 1817','Crassula helmsii | Crassula helmsii (Kirk) Cockayne','Ehrharta calycina | Ehrharta calycina Sm.','Elodea nuttallii | Elodea nuttallii (Planch.) H.St.John','Eriocheir sinensis | Eriocheir sinensis H.Milne Edwards, 1853','Faxonius limosus | Faxonius limosus (Rafinesque, 1817)','Faxonius rusticus | Faxonius rusticus (Girard, 1852)','Faxonius virilis | Faxonius virilis (Hagen, 1870)','Fundulus heteroclitus | Fundulus heteroclitus (Linnaeus, 1766)','Gambusia affinis | Gambusia affinis (Baird & Girard, 1853)','Gambusia holbrooki | Gambusia holbrooki Girard, 1859','Gunnera tinctoria | Gunnera tinctoria (Molina) Mirb.','Gymnocoronis spilanthoides | Gymnocoronis spilanthoides DC.','Hakea sericea | Hakea sericea Schrad. & J.C.Wendl.','Heracleum mantegazzianum | Heracleum mantegazzianum Sommier & Levier','Heracleum persicum | Heracleum persicum Desf.','Heracleum sosnowskyi | Heracleum sosnowskyi Manden.','Herpestes javanicus | Herpestes javanicus (É.Geoffroy Saint-Hilaire, 1818)','Humulus scandens | Humulus scandens (Lour.) Merr.','Hydrocotyle ranunculoides | Hydrocotyle ranunculoides L.fil.','Impatiens glandulifera | Impatiens glandulifera Royle','Koenigia polystachya | Koenigia polystachya (Wall. ex Meisn.) T.M.Schust. & Reveal','Lagarosiphon major | Lagarosiphon major (Ridl.) Moss','Lampropeltis getula | Lampropeltis getula (Linnaeus, 1766)','Lepomis gibbosus | Lepomis gibbosus (Linnaeus, 1758)','Lespedeza cuneata | Lespedeza cuneata (Dum.Cours.) G.Don','Limnoperna fortunei | Limnoperna fortunei (Dunker, 1857)','Lithobates catesbeianus | Lithobates catesbeianus (Shaw, 1802)','Ludwigia grandiflora | Ludwigia grandiflora (Michx.) Greuter & Burdet','Ludwigia peploides | Ludwigia peploides (Kunth) P.H.Raven','Lygodium japonicum | Lygodium japonicum (Thunb.) Sw.','Lysichiton americanus | Lysichiton americanus Hultén & H.St.John','Microstegium vimineum | Microstegium vimineum (Trin.) A.Camus','Misgurnus mohoity | Misgurnus mohoity (Dybowski, 1869)','Morone americana | Morone americana (Gmelin, 1789)','Muntiacus reevesi | Muntiacus reevesi (Ogilby, 1839)','Mustela vison | Mustela vison Schreber, 1777','Myocastor coypus | Myocastor coypus (Molina, 1782)','Myriophyllum aquaticum | Myriophyllum aquaticum (Vell.) Verdc.','Myriophyllum heterophyllum | Myriophyllum heterophyllum Michx.','Nasua nasua | Nasua nasua (Linnaeus, 1766)','Nyctereutes procyonoides | Nyctereutes procyonoides (Gray, 1834)','Ondatra zibethicus | Ondatra zibethicus (Linnaeus, 1766)','Oxyura jamaicensis | Oxyura jamaicensis (J.F.Gmelin, 1789)','Pacifastacus leniusculus | Pacifastacus leniusculus (Dana, 1852)','Parthenium hysterophorus | Parthenium hysterophorus L.','Perccottus glenii | Perccottus glenii Dybowski, 1877','Persicaria perfoliata | Persicaria perfoliata (L.) H.Gross','Pistia stratiotes | Pistia stratiotes L.','Plotosus lineatus | Plotosus lineatus (Thunberg, 1787)','Pontederia crassipes | Pontederia crassipes Mart.','Procambarus clarkii | Procambarus clarkii (Girard, 1852)','Procambarus virginalis | Procambarus virginalis Lyko, 2017','Procyon lotor | Procyon lotor (Linnaeus, 1758)','Prosopis juliflora | Prosopis juliflora (Sw.) DC.','Pseudorasbora parva | Pseudorasbora parva (Temminck & Schlegel, 1846)','Pueraria montana lobata | Pueraria montana var. lobata (Willd.) Maesen & S.M.Almeida','Pycnonotus cafer | Pycnonotus cafer (Linnaeus, 1766)','Reynoutria japonica | Reynoutria japonica Houtt.','Rugulopteryx okamurae | Rugulopteryx okamurae (E.Y.Dawson) I.K.Hwang, W.J.Lee & H.S.Kim, 2009','Salvinia molesta | Salvinia ×molesta D.S.Mitch.','Sciurus carolinensis | Sciurus carolinensis Gmelin, 1788','Sciurus niger | Sciurus niger Linnaeus, 1758','Solenopsis geminata | Solenopsis geminata (Fabricius, 1804)','Solenopsis invicta | Solenopsis invicta Buren, 1972','Solenopsis richteri | Solenopsis richteri Forel, 1909','Tamias sibiricus | Tamias sibiricus (Laxmann, 1769)','Threskiornis aethiopicus | Threskiornis aethiopicus (Latham, 1790)','Trachemys scripta | Trachemys scripta (Thunberg In Schoepff, 1792)','Triadica sebifera | Triadica sebifera (L.) Small','Vespa velutina nigrithorax | Vespa velutina nigrithorax Buysson, 1905','Wasmannia auropunctata | Wasmannia auropunctata (Roger, 1863)','Xenopus laevis | Xenopus laevis (Daudin, 1802)']);
}


27 changes: 27 additions & 0 deletions source/export/survey_experts/appsscript_gform.gs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function createForm() {
var form = FormApp.create('questionnaire_test');


var item = form.addListItem();
item.setTitle('Which species are you reporting for?');

item.setChoices([
item.createChoice('[IAS list to be updated]'),
]);

var item = form.addMultipleChoiceItem();
item.setTitle('Is the species currently present or absent in Vlanders?');

item.setChoices([
item.createChoice('present'),
item.createChoice('absent'),
]);

form.addParagraphTextItem().setTitle('Explain briefly.');

var folderId = '1INTfoS4vLtt4QmrwWLjhV43UoWjo8aix';
var folder = DriveApp.getFolderById(folderId);
var file = DriveApp.getFileById(form.getId());
file.moveTo(folder);

}

0 comments on commit faf35c0

Please sign in to comment.