Looping in AppSheet | The most comprehensive tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 มิ.ย. 2024
  • 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
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 104

  • @SethKwameAnkamah
    @SethKwameAnkamah 8 วันที่ผ่านมา

    Thank you soo soo much. This will really go a long way to help me. I like your vivid explanations as well.

    • @FullOfSheets
      @FullOfSheets  4 วันที่ผ่านมา

      Glad it was helpful!

  • @Muthukumar-mp8iv
    @Muthukumar-mp8iv 3 หลายเดือนก่อน +4

    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  3 หลายเดือนก่อน +1

      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 3 หลายเดือนก่อน +2

    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  3 หลายเดือนก่อน

      Wow, thanks! That's very nice of you to say. 🤗

    • @betopalou7772
      @betopalou7772 หลายเดือนก่อน

      Great Job!! Many thanks of sharing it!👏🏻

    • @FullOfSheets
      @FullOfSheets  หลายเดือนก่อน

      Thanks too.

  • @Adrian-ll6ef
    @Adrian-ll6ef 3 หลายเดือนก่อน +1

    mas magaling kayo mag explain compared to other appsheet yt channels. tamang pacing lang. kudos!

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Wow! Salamat, kabayan!! 🇵🇭

  • @uuzgan
    @uuzgan 3 หลายเดือนก่อน +2

    Brilliant solution, Perfect explanation.. Thank you.

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Thank you for appreciating! I'm glad you liked the way I explained it.

  • @LionelCOSTE
    @LionelCOSTE 20 วันที่ผ่านมา

    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  19 วันที่ผ่านมา

      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 3 หลายเดือนก่อน

    Brilliant!!! exactly what I've been searching for and trying to understand. Awesome breakdown!!

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      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. 🤗

  • @gerarbendfeldt
    @gerarbendfeldt 3 หลายเดือนก่อน +1

    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  3 หลายเดือนก่อน +1

      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 3 หลายเดือนก่อน +2

    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  3 หลายเดือนก่อน

      We are all full of sheets! 😅😅😅😅

    • @user-xj8dp5ch7y
      @user-xj8dp5ch7y 3 หลายเดือนก่อน +1

      Yes we are, thankx to your greadt videos!!
      Thanx for coming to the rescue as always.........@@FullOfSheets

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Thank you 🙏. I appreciate it.

  • @AndersonKuba
    @AndersonKuba 3 หลายเดือนก่อน +1

    You save my project! Thank you!

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      You're welcome!

  • @rafaelfarfan6592
    @rafaelfarfan6592 หลายเดือนก่อน

    Thanks for sharing Pal!

  • @DustinWhitmire
    @DustinWhitmire 3 หลายเดือนก่อน

    Well done. Hope to see more from you.

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      More to come! A like and sub will help a lot. Thank you.

  • @AndersonKuba
    @AndersonKuba 3 หลายเดือนก่อน

    a very elegant solution

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน +1

      I know, right? :)
      Thanks for dropping by.

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      I know, right? :)
      Thanks for dropping by.

  • @kitoh504
    @kitoh504 3 หลายเดือนก่อน

    So good! 👏👏👏👏👏✨✨✨✨

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Thank you! Cheers!

    • @kitoh504
      @kitoh504 3 หลายเดือนก่อน

      This is so useful in creating a recurring budget. Thank you!

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Indeed. There are really a lot of use cases. You're welcome.

  • @bohdanstyslo
    @bohdanstyslo 3 หลายเดือนก่อน

    Thanks for the video!
    How reliable is it? I'm wary of such long automations for some reason🤨

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน +1

      So far so good. I mean, how many would be the max records do you foresee doing in a single save?

    • @bohdanstyslo
      @bohdanstyslo 3 หลายเดือนก่อน +1

      @@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  3 หลายเดือนก่อน +2

      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.

  • @nuwansandeeepa2779
    @nuwansandeeepa2779 3 หลายเดือนก่อน

    🎉🎉

  • @HeathBiller-zh4zt
    @HeathBiller-zh4zt หลายเดือนก่อน

    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  หลายเดือนก่อน +1

      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 หลายเดือนก่อน

      @@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  หลายเดือนก่อน

      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 หลายเดือนก่อน

      @@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  หลายเดือนก่อน +1

      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.

  • @SaRcaSticBC
    @SaRcaSticBC 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน

      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 2 หลายเดือนก่อน +1

      @@FullOfSheets yeah. I tried that after commenting and it worked. Still thanks for the response.

    • @FullOfSheets
      @FullOfSheets  2 หลายเดือนก่อน +1

      You're welcome.

  • @boydb3956
    @boydb3956 2 หลายเดือนก่อน

    such an amazing video! I still can't get the loop to stop. it just goes on forever :(

    • @FullOfSheets
      @FullOfSheets  2 หลายเดือนก่อน +1

      😅 Did you put the behavior available if setting on all three actions?

    • @testingtea
      @testingtea 16 วันที่ผ่านมา

      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  15 วันที่ผ่านมา

      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.

  • @jaichithjeyakumar507
    @jaichithjeyakumar507 หลายเดือนก่อน

    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  หลายเดือนก่อน

      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.

  • @srudkin1
    @srudkin1 หลายเดือนก่อน

    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  หลายเดือนก่อน

      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.

  • @AtulSingh-qm4vr
    @AtulSingh-qm4vr 2 หลายเดือนก่อน

    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  หลายเดือนก่อน

      Did you try putting the break condition in all the actions in the group, as shown in the video?

    • @AtulSingh-qm4vr
      @AtulSingh-qm4vr หลายเดือนก่อน +1

      @@FullOfSheets Yes condition is added in all three actions and thank you, I cracked my interview by watching your videos😀

    • @FullOfSheets
      @FullOfSheets  หลายเดือนก่อน

      Wow!!! That is awesome!!
      Thanks for letting me know.
      Congratulations!

  • @rajteacher
    @rajteacher 3 หลายเดือนก่อน

    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  3 หลายเดือนก่อน

      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)?

  • @rajteacher
    @rajteacher 3 หลายเดือนก่อน

    You fill Enumlist 2024 to 2028 ? how please explain >> time 4:53

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      What do you mean?
      I added each year manually.
      I just cut the video so you won't be bored. 😊

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน +1

      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. ☺️

  • @HappyMrGhost
    @HappyMrGhost 2 หลายเดือนก่อน

    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  2 หลายเดือนก่อน

      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 2 หลายเดือนก่อน +1

      @@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  2 หลายเดือนก่อน

      That makes sense. Can you try to put the same loop condition in the Bot event?

    • @FullOfSheets
      @FullOfSheets  2 หลายเดือนก่อน

      The one that stops rhe lioop.

    • @hiikhenghui5567
      @hiikhenghui5567 หลายเดือนก่อน

      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..

  • @user-tv3pv8tl5i
    @user-tv3pv8tl5i 3 หลายเดือนก่อน

    If I have 200+ records selected, how much time it might take?

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      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 3 หลายเดือนก่อน

      @@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  3 หลายเดือนก่อน

      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 3 หลายเดือนก่อน +1

      Loop it in a workflow,BOT, it takes some seconds to finish

    • @FullOfSheets
      @FullOfSheets  3 หลายเดือนก่อน

      Have you observed a difference between bot workflows and actions?