Hello all! im new to this community and only just discovered AI2 App inventor.
I run a Non profit Community Tabletop Club. Called Friockheim Tabletop Club.
Taking attendance by pen and paper every week was tedious and hard to read if the "Taker" of the attendance had bad hand writing. so i decided to give this a shot. So far the App takes attendance of folk using their membersip QR cards and updates a googlesheets doc online. The problem ive come across is that when the "Taker" forgets that they have scanned a person they have no way of finding out. So they asked for a screen whee they can check to see who is "Checked in". so far i have coded what i believe is the correct coding to allow this but when the variable is "returned" to the app. it will only display one result or if there is more than one result of "Todays date" then it will return "No Entries Found". which is confusing as i have a logger in the script which allows me to see that the variable did store the correct amount of rows needed when it did its filter.
Could anyone help me figure out why its not returning the whole array if there is more than one row in that array.
Perfect! that worked! i had to change a few typos as Row wasnt "defined" etc and then it kept popping up saying cant find "doPost" in the app. so the final code that worked was this....
// Commences function to retrieve action variable from app.
function doGet(e){
var action = e.parameter.action;
if(action == "check"){
return doPost(e);
}
else{
return doPost(e);
}
}
function doPost(e){
var ss = SpreadsheetApp.openByUrl("https://");
var dailySheet = ss.getSheetByName("daily_attendance");
var row = dailySheet.getDataRange().getValues();
var output = ;
return doPost(e);
}
else{
return doPost(e);
}
}
function doPost(e){
To get a vertical listing of names, you will have to iterate over the list returned and insert either the “\n” or the (if htmlFormat is set) after each item added to join in label.
What I’d suggest is that since it is a data in comma seperated format, you can simply create a List using split text function and then display it in a ListView.
Further if you need to separate the First Name and Last Name records using space as seperator, you may create a list of lists, where each record of the nameList contains a two-element list, with First name as first element and last name as second element.
Also, as Tim mentioned, you do not need doPost function in the code for the above mentioned task.
Would just like to say thank you very much for both your guys help! This has helped alot with my understanding of how this prograam works and a little more of googlescript javascript as well