Looping in AppSheet | The most comprehensive tutorial

  Рет қаралды 7,030

Full Of Sheets

Full Of Sheets

Күн бұрын

AppSheet Looping allows you to simulate the for() and forEach() loop functions in javascript.
As a response to the request of @martinnjeri6997 ,this allows you to do something repeatedly until a certain condition is met.
In this video, we will demonstrate and fully explain how Looping in Appsheet works and how it is implemented in your AppSheet apps.
There are a lot of use cases for looping. In this video, we will select multiple months from a dropdown, and create individual entries per month to another table.
We did it by utilizing the following:
● Ref columns
● Group actions
● List comparisons
● INDEX() expression
Get the AppSheet Best P4actices eBook:
bit.ly/4bh3JSp
Use Coupon Code: imsofullofsheets
(Thanks for your suppport. 🙏)
This video is a response to a question by @martinnjeri6997 in our video • Say Goodbye to Complex...
Building from this app, watch this next:
• Boost Your AppSheet Pr...
_______________________
Recommended Related Videos:
AppSheet Best Practices
• Level Up Your App Deve...
5 Ways to Create Dropdowns
• Top 5 Ways to Make Dro...
================================
Video Chapters
00:00 What is Looping?
00:26 Member Shoutout
01:06 Sample use-case
03:05 Setting up a Looper helper table
06:23 Linking Looper table to Main table using Ref columns
10:17 Looping Step 1: Create action to add records to Main table
13:30 Preparing the EnumList Iteration
14:55 Illustration of Lists Comparison
17:50 Looping Step 2: Create an Action Group
19:02 Looping Step 3: Create a Repeat action to restsrt the Action Group
21:01 Understanding how the iterations work in the background
22:11 Setting up the condition to stop the loop
24:20 Setting up the loop trigger
27:24 Recommended next steps
27:46 Other possibilities of using Looping
28:29 "3-Steps to Loop" review
================================
#appsheet #fullofsheets #looping #loops #buildingwithappsheet #appsheetforbeginners

Пікірлер: 116
@Muthukumar-mp8iv
@Muthukumar-mp8iv 5 ай бұрын
You are the savior, as I just about to start our Library project where every member can check out multiple books at time for which I was wondering how to add multiple rows in check out table...you saved my day...thanks a lot....you should post video often 😜
@FullOfSheets
@FullOfSheets 5 ай бұрын
You're very welcome! I would love to post more often but finding time is a bit of a challenge, as I am also doing development for clients. But I'll do my best. Thank you for subscribing.
@IndyKK
@IndyKK 5 ай бұрын
Among a few "sort of ok" AppSheet resource channels, yours really shine. The logical process, the get-to-the-point presentations, and your generous answers make sense. Wish you the best for this channel! Thank you!
@FullOfSheets
@FullOfSheets 5 ай бұрын
Wow, thanks! That's very nice of you to say. 🤗
@betopalou7772
@betopalou7772 3 ай бұрын
Great Job!! Many thanks of sharing it!👏🏻
@FullOfSheets
@FullOfSheets 3 ай бұрын
Thanks too.
@SethKwameAnkamah
@SethKwameAnkamah 2 ай бұрын
Thank you soo soo much. This will really go a long way to help me. I like your vivid explanations as well.
@FullOfSheets
@FullOfSheets 2 ай бұрын
Glad it was helpful!
@uuzgan
@uuzgan 5 ай бұрын
Brilliant solution, Perfect explanation.. Thank you.
@FullOfSheets
@FullOfSheets 5 ай бұрын
Thank you for appreciating! I'm glad you liked the way I explained it.
@Adrian-ll6ef
@Adrian-ll6ef 5 ай бұрын
mas magaling kayo mag explain compared to other appsheet yt channels. tamang pacing lang. kudos!
@FullOfSheets
@FullOfSheets 5 ай бұрын
Wow! Salamat, kabayan!! 🇵🇭
@gerarbendfeldt
@gerarbendfeldt 5 ай бұрын
You alone, will make Appsheet the best for busnisess. I love your videos, keep it up! It would be awsome to have a video showing how expression works or tips for that kind of things
@FullOfSheets
@FullOfSheets 5 ай бұрын
Thanks for the nice words. I have actually been thinking about making videos about expressions. But it is just to broad to put in a single topic that I can't decide how to present them. Otherwise, I will end up with a lot of random ideas that may be to unengaging and boring for you guys. For example, you can use expressions on column formulas, on show, edit, or require, on initial values, display valies, and description. You can also use expressions on other column settings such as valid if, error message, suggested values, reset on edit, etc. It's just too broad to say "expressions". If you have ideas or suggestions on how I can go about it, please let me know. 🙏
@user-xj8dp5ch7y
@user-xj8dp5ch7y 5 ай бұрын
Maestrooo!!! 🔥🔥🔥🔥🔥🔥You nailed it right on the head, this was a nightmare for me, you have explained it very well and i have gotten it loud and clear!! Thanx forfor coming for my rescue...... You are soo full of sheeets man🤣🤣🤣🤣🤣🤣
@FullOfSheets
@FullOfSheets 5 ай бұрын
We are all full of sheets! 😅😅😅😅
@user-xj8dp5ch7y
@user-xj8dp5ch7y 5 ай бұрын
Yes we are, thankx to your greadt videos!! Thanx for coming to the rescue as always.........@@FullOfSheets
@FullOfSheets
@FullOfSheets 5 ай бұрын
Thank you 🙏. I appreciate it.
@LionelCOSTE
@LionelCOSTE 2 ай бұрын
You're becoming better and better each time 💪 A complex concept transformed in a clear process because of your explanations ! We really can feel it's hard to do when you come back on the field's names changes on the GSheets but it's here in that points where we clearly understand the rigourous methodology in your way to code. Great job really ! What kind of studies did you followed ? I'm curious to know how you learn all that stuffs , resolving your specific customers demands ? Where are you living ? Indonesia ? Would you teach people some technics during a one week session ?
@FullOfSheets
@FullOfSheets 2 ай бұрын
Hi Lionel, I really appreciate your praises. Thank you very much. I am from the Philippines 🇵🇭 . Pinoy is a local term we use for Filipino. My background came mostly from Ms Access programming and Javascript Frameworks. Before AppSheet I used to develop responsive web apps for clients via Google Apps Script code and its HTML Service., and Google Sheets as the backend. This was because most of them utilize Google Workspace. It was really time-consuming just to be able to build just one view. So when AppSheet came, it was almost a no brainer for me, even if AppSheet still used to be clunky and there were still implementations that required JSON notation. When Google acquired AppSheet, oh man, I can't tell you how happy I was that building a functioning app was just like designing spreadsheet templates.
@dannykorman8933
@dannykorman8933 5 ай бұрын
Brilliant!!! exactly what I've been searching for and trying to understand. Awesome breakdown!!
@FullOfSheets
@FullOfSheets 5 ай бұрын
Thank you for appreciating. ❤ It's comments like these that motivate me to do all the work in trying to explain complicated things in an easy-to-digest manner. 🤗
@rafaelfarfan6592
@rafaelfarfan6592 3 ай бұрын
Thanks for sharing Pal!
@FullOfSheets
@FullOfSheets 3 ай бұрын
You bet!
@AndersonKuba
@AndersonKuba 5 ай бұрын
You save my project! Thank you!
@FullOfSheets
@FullOfSheets 5 ай бұрын
You're welcome!
@DustinWhitmire
@DustinWhitmire 5 ай бұрын
Well done. Hope to see more from you.
@FullOfSheets
@FullOfSheets 5 ай бұрын
More to come! A like and sub will help a lot. Thank you.
@AndersonKuba
@AndersonKuba 5 ай бұрын
a very elegant solution
@FullOfSheets
@FullOfSheets 5 ай бұрын
I know, right? :) Thanks for dropping by.
@FullOfSheets
@FullOfSheets 5 ай бұрын
I know, right? :) Thanks for dropping by.
@kitoh504
@kitoh504 5 ай бұрын
So good! 👏👏👏👏👏✨✨✨✨
@FullOfSheets
@FullOfSheets 5 ай бұрын
Thank you! Cheers!
@kitoh504
@kitoh504 5 ай бұрын
This is so useful in creating a recurring budget. Thank you!
@FullOfSheets
@FullOfSheets 5 ай бұрын
Indeed. There are really a lot of use cases. You're welcome.
@nuwansandeeepa2779
@nuwansandeeepa2779 5 ай бұрын
🎉🎉
@FullOfSheets
@FullOfSheets 5 ай бұрын
😛😛
@CristianMoletto
@CristianMoletto 12 күн бұрын
Awesome idea! Thank you 😉 Just a litte question: I customize the formula in Action > Set these columns, because I have a different structure table. But I notice that when I add a record in the form, it attach just two rows: - The first one starts with first values; - The second one starts with second values; - Than for the other values (>3) it overwrites the first row Why? How can I solve? Thanks 🙏
@FullOfSheets
@FullOfSheets 12 күн бұрын
This would most probably because of the formula you set for the first action. You have to make sure that the [first list] - [related list][column] = list not yet added. You may want to test it out by adding a virtual column you can see as the loop goes. For example, add a virtaul column called [myVC] where the formula is [my Enum List] - [my Related List][my column to check] Then, on the expression of your first action, simply use INDEX([myVC], 1) And on your loop stopper expression, use ISNOTBLANK([myVC]) The [myVC] will be updating for each loop, and you can see what happens on each iteration.
@CristianMoletto
@CristianMoletto 12 күн бұрын
@@FullOfSheets thanks for answering! I need to stamp a progressive row value (1,2,3.. etc). The condition for how many rows to attach depends on total rows number question on the form. Right now i tried different ways to do that, even automations, but after the second row, it overwrite the first one with other values (3,4,5 or more). I can see it as it goes. At the end, the first row has the last number value, the second row has the number 2 (and this is right)
@FullOfSheets
@FullOfSheets 7 күн бұрын
So you mean there is no EnumList that would be the basis of the number of rows added, right? Would it then be a number column asking the actual number of rows to be added to the child? And what i formation from the parent would be transferred to each child rows?
@bohdanstyslo
@bohdanstyslo 5 ай бұрын
Thanks for the video! How reliable is it? I'm wary of such long automations for some reason🤨
@FullOfSheets
@FullOfSheets 5 ай бұрын
So far so good. I mean, how many would be the max records do you foresee doing in a single save?
@bohdanstyslo
@bohdanstyslo 5 ай бұрын
@@FullOfSheets The user really wanted to be able to add 5 entries at once. I convinced him that this is not the custom in databases)))
@FullOfSheets
@FullOfSheets 5 ай бұрын
5 entries would be okay. I've tested upto 20 entries and they worked fine. But you are right, database wise, this is not the custom. Adding records to subtables (like an order details) are really done one record at a time. But Appsheet is like a hybrid platform. It's like an "in-between" of Database and Spreadsheet.
@TruongNguyen-mg5ch
@TruongNguyen-mg5ch 17 күн бұрын
Thank you soo much. When I edit column "year" of table looper but column "year" of table main don't change. Can u help me!!!!
@FullOfSheets
@FullOfSheets 16 күн бұрын
That is the downside. Since this Looping demo only focuses on the initial creation. Succeeding edits do not update the child records. That would require a different action or automation.
@ndv-x7v
@ndv-x7v Ай бұрын
Very good solution. However, it doesn't work for me because the function loops on the second value from the list. I added the "only if this condition is true" condition to all 3 actions. Do you have any idea what I could have done wrong?
@FullOfSheets
@FullOfSheets 29 күн бұрын
Most often than not, it would be on the condition to stop the loop that may trigger this infinite loop.
@HeathBiller-zh4zt
@HeathBiller-zh4zt 3 ай бұрын
Very informative. I appreciate the video and I was able to successfully make this work. I am looping workflows to generate tasks to a task list. Once the task gets completed though...in the future if I want to initiate the workflow to add the tasks on again, it won't work as the task is already listed in the column. Any thoughts or ideas on how to filter out all of the completed tasks when Appsheet is generating the Index function?
@FullOfSheets
@FullOfSheets 3 ай бұрын
A workaround I can think of is to have another Related Tasks virtual column, but instead of using ref rows, you should use a FILTER() or SELECT() statements which allows you to set a criteria to return only those that are not yet completed. Make sure that this VC is a List type column, and in the column settings, must be a Ref element type pointing to the task list. You can then have this VC hidden and use this instead in your Index() function. INDEX( [EnumList] - [Hidden Related Tasks][Task Name], 1)
@HeathBiller-zh4zt
@HeathBiller-zh4zt 3 ай бұрын
@@FullOfSheets Thank you, I really appreciate the help. My formula ended up being slightly different than what you suggested just in case anyone else ends up reading these comments. I made the virtual column but I filtered it by Completed tasks instead of non-completed tasks. Then I subtracted the virtual column of the completed task from the list of all of the tasks. This resulted all of the non-completed tasks and is what I ended up subtracting from the EnumList. The result has this loop automatically add the tasks from the workflow to the pending tasks list as long as the task is not currently pending, even if the tasks was completed in the past. index([EnumList]-(Tasks[All Task]-Tasks[Completed Tasks]),1)
@FullOfSheets
@FullOfSheets 3 ай бұрын
Great Job! Thanks for sharing what you ended up with as well. Be careful and make sure you test this with another project record as well. Since you are directly referencing to the Tasks table instead of the Related Tasks, you might end up comparing to all the tasks that are pending from all the projects in your app, instead of only the comparing it to the Pending tasks related to this project only. But if it works, then it works. There is always more than 1 way to skin a cat. 😻
@HeathBiller-zh4zt
@HeathBiller-zh4zt 3 ай бұрын
@@FullOfSheets The "Tasks[Completed Tasks] in the formula is a virtual column so it does appear to be working. At the end of your video you mentioned having the row automatically delete once the bot completes the loop. What is the best way to set that up? I have been trying a couple of different ways but can't seem to figure out how to have it delete the initial input once the loop completes.
@FullOfSheets
@FullOfSheets 3 ай бұрын
You will have to create another action that deletes the row specifying the key in the action's behavior condition. Also ensure that the condition also checks if the difference of your EnumList and your VC is already blank so it does not trigger until all tasks are already created. You then add this Delete action as the last step in your loop group. Also, I only recommended that bec the Looper table in this video do not actually have any purpose other than to create the loop. If this is a table with a purplse, for example a Project table which has Tasks child records, then of course I wouldn't delete the project record after all tasks are created.
@boydb3956
@boydb3956 4 ай бұрын
such an amazing video! I still can't get the loop to stop. it just goes on forever :(
@FullOfSheets
@FullOfSheets 4 ай бұрын
😅 Did you put the behavior available if setting on all three actions?
@testingtea
@testingtea 2 ай бұрын
Hey, I had this happen too. I fixed it by making sure the triggered action was the Repeat Action, rather than the Group Action. Hope this helps :)
@FullOfSheets
@FullOfSheets 2 ай бұрын
This is true. And in my video, i even said to put the loop stop in All the actions on the group, including the group itself. But most importantly, the repeat action.
@mrjwf007
@mrjwf007 Ай бұрын
hello, could this work if you used some kind of button, Create another for example?
@FullOfSheets
@FullOfSheets 29 күн бұрын
It can, the problem is that the action buttons are not accessible in a form view. So you will have to save the form first, then click the button in a detail view, or in a table/deck view while the row is selected.
@djflexkid
@djflexkid Ай бұрын
Could you do an update of this video including the year also as an enumlist please? Meaning to say if I choose two years an two months, I want the loop to create records for each year both months in the main table.
@FullOfSheets
@FullOfSheets 22 күн бұрын
I will have to check if I can do an update for the video. It is a very rare use case to have this capability but it is doable by using loops within loops, meaning one of the steps in the loop group, is another loop group. There will be some hidden virtual columns needed to monitor which combination values already exist in the child tables.
@srudkin1
@srudkin1 3 ай бұрын
I have a table where name and date may appear multiple times in the table. Is it possible to create a child table from this one where the unique date and name only appear once in the child table?
@FullOfSheets
@FullOfSheets 3 ай бұрын
I'm a little confused since you mentioned "table". Looping can only be do e from a record/row of that table. We cannot loop using the entire table.
@jaichithjeyakumar507
@jaichithjeyakumar507 3 ай бұрын
Could you please give me use cases examples for this looping ? Because it creates new main ids ... With same looper id... I don't where to apply this
@FullOfSheets
@FullOfSheets 3 ай бұрын
You probably haven't encountered a project that would would make you think of this. Let's say, for example, i have an Orders Table with a chuld record of Order Items where I add a Product for each item (like a sales invoice). I can just simply click "Add" in the child table, then select a product. It then creates 1 entry in the child table for that product as an item in the order. But what if I need to add 20 items in the order? Then that's about clicking the "Add" button 20 times, clicking the product dropdown and scrolling thru the product, selecting the prooduct, then climing save. You have to do it 20 times. So maybe just add an Enum list to the Order to select the products you want for the order, then an Order Items record will be auto created in the child table automatically.
@rajteacher
@rajteacher 5 ай бұрын
Suppose I have a table. Roll number, name, class. I want three empty columns next to it. In which I can fill the marks of the student. Math, Science and English. The last column should be of total. The first three columns should be filled in. But the last 4 are empty. What do I want different here? , If I select the student from the table itself, the form opens as a reference. And I can fill marks in it. This form should be saved on another sheet. The last four columns of the original table remained empty. What could be a better way?
@FullOfSheets
@FullOfSheets 5 ай бұрын
I understood your question but I'm just trying to understand which part of your scenario are you trying to do a loop? When you select a student, is it just a single student (Enum) or multiple students (EnumList)?
@SaRcaSticBC
@SaRcaSticBC 4 ай бұрын
Nice logic. Would be helpful for me once I get past the problem I'm facing entering the value in the enum list. So my user can copy and paste "Hello my Name" and i want it to save as Hello My Name three different item in list. Is that possible?
@FullOfSheets
@FullOfSheets 4 ай бұрын
No, because you are trying to paste a text to a list column. What you can do is add a virtual column that splits your "Hello my Name" using space as the delimiter. The virtual column should automatically detect itself as a list type column. You can then use that VC as the basis of your loop, instead of an Enum List.
@SaRcaSticBC
@SaRcaSticBC 4 ай бұрын
@@FullOfSheets yeah. I tried that after commenting and it worked. Still thanks for the response.
@FullOfSheets
@FullOfSheets 4 ай бұрын
You're welcome.
@AtulSingh-qm4vr
@AtulSingh-qm4vr 3 ай бұрын
When I add Repeat action(Break condition is added) to the Group action my App crashes(screen becomes white). Add to main DB is working fine it adds first entry of enum list( without repeat action included ). Any suggestions?
@FullOfSheets
@FullOfSheets 3 ай бұрын
Did you try putting the break condition in all the actions in the group, as shown in the video?
@AtulSingh-qm4vr
@AtulSingh-qm4vr 3 ай бұрын
@@FullOfSheets Yes condition is added in all three actions and thank you, I cracked my interview by watching your videos😀
@FullOfSheets
@FullOfSheets 3 ай бұрын
Wow!!! That is awesome!! Thanks for letting me know. Congratulations!
@rajteacher
@rajteacher 5 ай бұрын
You fill Enumlist 2024 to 2028 ? how please explain >> time 4:53
@FullOfSheets
@FullOfSheets 5 ай бұрын
What do you mean? I added each year manually. I just cut the video so you won't be bored. 😊
@FullOfSheets
@FullOfSheets 5 ай бұрын
I could also have just created the list in a Google Sheet tab (coz it's easier there), and then added that as another table. Then I could have used the Text+Valid If combination to create the dropdown. However, I didn't want to add more tables to the project since it's just a sample, and it's not the main focus of the topic. ☺️
@user-tv3pv8tl5i
@user-tv3pv8tl5i 5 ай бұрын
If I have 200+ records selected, how much time it might take?
@FullOfSheets
@FullOfSheets 5 ай бұрын
It would depend on a lot of things. Your internet connection stability is a big factor. But let's assume each loop is a second. So we can say 200 seconds. But that's syncing with the server. The update in the user's view should be a lot faster than that. But to loop through 200? That means the user selected 200 records in the enumlist? There might be a more efficient way to design your app. But that's just me thinking out loud.
@user-tv3pv8tl5i
@user-tv3pv8tl5i 5 ай бұрын
@@FullOfSheets Before this I have created a action. First I'll select the number of tasks I want to perform. Once I clicked on assign button (Which is an action), it will update the details into the main sheet. But its taking lot of time. To update 20 records its taking more than 7-8 minutes. Can you help me if. there's any better way to do ?
@FullOfSheets
@FullOfSheets 5 ай бұрын
This is called a Batch Update., which is totally different from Looping. Batch Update is to update the assignment of existing tasks, not to create the tasks, which is what we was done in the looping in this video. 7-8 minutes just to update 20 records? That's just too long. Something else is happening here. Do you have a lot of virtual columns in the Tasks table?
@husseinosseily5773
@husseinosseily5773 5 ай бұрын
Loop it in a workflow,BOT, it takes some seconds to finish
@FullOfSheets
@FullOfSheets 5 ай бұрын
Have you observed a difference between bot workflows and actions?
@HappyMrGhost
@HappyMrGhost 4 ай бұрын
I followed your steps exactly, but found that when I run the group action manually, it runs through it and completes instantly. When I add the group function to the automation, it doesn't complete it until I've sync'd the app. And then syncing takes 10+ minutes. Why is it so much faster running manually?
@FullOfSheets
@FullOfSheets 4 ай бұрын
Because automations runs in the server side and it takes some time (upto 30 minutes) for your client side app to fetch the changes, while running it manually runs on the client side first the sends it to server side. This may help: Go to Settings Then Performance Make sure Quick Sync is on Turn on Delayed Sync And most importantly, turn on Automatic Updates.
@HappyMrGhost
@HappyMrGhost 4 ай бұрын
@@FullOfSheets Thanks for the reply, I've changed the settings as you mentioned but it's giving me a the same result repeated over and over instead of different results. When I run it manually, it gives me the 4 new rows I expect, 1,2,3 & 4. But running the same group action via the automation, I get 1 and then 122 copies of 2, and then I think it times out. It's almost like it's running too fast to realize there was a change in the data.
@FullOfSheets
@FullOfSheets 4 ай бұрын
That makes sense. Can you try to put the same loop condition in the Bot event?
@FullOfSheets
@FullOfSheets 4 ай бұрын
The one that stops rhe lioop.
@hiikhenghui5567
@hiikhenghui5567 3 ай бұрын
I had the same problem. The new row added in child table keep looping and change the selection which I select just now. It stop creating added a new row..
Building Strong Connections with Many-to-Many in AppSheet
22:54
Full Of Sheets
Рет қаралды 3,6 М.
Top 5 Ways to Make Dropdown Lists in AppSheet 2024 | Best 5 Methods
16:06
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 36 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
Establishing Many to Many Relationships in AppSheet
36:28
Appify Your Business
Рет қаралды 8 М.
AppSheet App Jam: Tips, tricks, and troubleshooting for new users
1:06:23
Google Workspace is even better than a New Planner
5:04
Clutter Care Organizing
Рет қаралды 4,9 М.
Level Up Your App Development: Mastering Appsheet Best Practices
38:36
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 33 М.
How to combine AppSheet with Apps Script - Video tutorial
11:14
Google Workspace Developers
Рет қаралды 37 М.
GraphRAG: The Most Incredible RAG Strategy Revealed
10:38
Mervin Praison
Рет қаралды 29 М.
Preparing your Google Sheet for AppSheet
11:22
Google Workspace
Рет қаралды 75 М.
Será Que a FITA vai Grudar ela na PAREDE😱 #shorts
0:44
Lucan Pevidor
Рет қаралды 63 МЛН
Забота Казахов🇰🇿
0:45
QAZAQ PEOPLE
Рет қаралды 363 М.
ДОМАШНЕЕ ЭСКИМО//ПРОВЕРКА РЕЦЕПТА ТИК ТОК
0:22
ОЛЯ ПЕРЧИК
Рет қаралды 1,4 МЛН
Epic Beach Day! Digging a Massive Hole!
0:12
MELIAH & DAD (THE PONTES FAMILY)
Рет қаралды 4,2 МЛН