Unit 5 - Using a Dropdown to Process Datasets into Filtered List(s) - Code.org

Поділитися
Вставка
  • Опубліковано 26 січ 2025

КОМЕНТАРІ • 49

  • @vakyodai
    @vakyodai 3 роки тому +7

    You saved my grade fam appreciate it

  • @ANelson2
    @ANelson2 3 роки тому +8

    Thank you sir, this cleared up some of my doubts and troubles

  • @bertlingforling
    @bertlingforling Рік тому +1

    hey can you briefly explain your list scrolling pattern? with the onevent button click

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      Well, for the list scrolling pattern. We want to use the data that is found within our filteredLists. We DO NOT use the original data set to scroll through the list as it contains all of the data prior to filtering.
      The filteredLists will always have a lesser or equal length of that of the filteredLists (more often than not its lesser and almost never equal).
      We traverse through the filteredLists as that is our new data that we actuall want to access.
      Hope this clarifies it. 🤞

  • @vihaanborude6308
    @vihaanborude6308 2 роки тому +3

    Is there any way to dynamically populate Choices dropdown ? why typing manually ?

  • @splassh5693
    @splassh5693 3 роки тому +10

    I'm doing something similar to this but when I choose from my drop-down menu, it displays the last element in my list. Does anyone know why that would happen?

  • @natyjose8526
    @natyjose8526 9 місяців тому +1

    why does it have to be string lowercase?

    • @MyCodingJourney318
      @MyCodingJourney318  9 місяців тому

      I like to compare strings in its lower case form so that I don't have to worry about capitalization.
      "This Word" is not the same "this word".

  • @abdulthegoat7912
    @abdulthegoat7912 Рік тому

    Is there a way that I can create values of the drop down my self. Then I make that whatever value the user picks equal to a value in the list

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      Hello Abdul,
      I think this is what you meant:
      var list = [];
      onEvent("text_input1", "change", function( ) {
      var item = getText("text_input1");
      appendItem(list, item);
      setText("text_input1", "");
      setProperty("dropdown1", "options", list);
      });
      Let me know if this helps. Remember to test this program in a new project first so that you can eventually add it to a larger project. I used a text input and a dropdown on the interface.
      Change the onEvent from "click" to "change".

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      Hey so, I did find a video I also created on what I think you are asking about:
      ua-cam.com/video/K39InX8FNO4/v-deo.html

  • @zomi7208
    @zomi7208 2 роки тому +2

    how do you make it output everything in the list (i'm also using 3 lists)

  • @lololol3339
    @lololol3339 Рік тому

    Can I use this even tho my drop-down and my result page isn’t on the same screen? Because I’m doing a us states and the capitals

  • @that_one_dude496
    @that_one_dude496 Рік тому

    How can i search with location states as the options in the dropdown

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      rephrase your sentence. I don't understand what you are asking me. 😊

  • @diegomvg999
    @diegomvg999 Рік тому

    How do I make my list update because it’s stuck on outputting the first thing on the list

  • @Khriz-td4og
    @Khriz-td4og Рік тому +1

    My watchers said the filtered lists have 0 please help

  • @drummingwithnixon
    @drummingwithnixon Рік тому

    Hey, i did a code similar to you but it is not working. I was wondering if you cant help. Thank you.

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      Best of luck with debugging. I tend not to help during period when people are doing the Performance Task. I do have a video on all about helping debug the most frequent issues. Its on my chanel. Best of luck once again! :)

    • @fcjimmy1526
      @fcjimmy1526 Рік тому

      @@MyCodingJourney318 Hey, I used this code segment for my function for the Create Task so do I need to cite this or is there no need to?

    • @kayomii-
      @kayomii- Рік тому

      @@fcjimmy1526 did you cite him?

  • @PROFANEHYDRA
    @PROFANEHYDRA Рік тому

    i keep getting the error: "population.toLowerCase is not a function" why could this be?

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      I do not help within the timeline of the Performance Task. Sorry but best of luck!

    • @lisanitzsche2720
      @lisanitzsche2720 Рік тому

      @@MyCodingJourney318 what do you mean by Performance Task? I'm a teacher looking to create my own app as an example and trying to help students who want to use the same type of filtering system, but we keep coming across this issue, even when I'm replicating your code line by line to just understand how everything works. It's a little odd that your code would work fine and my version pops up with an error

  • @gmehh4863
    @gmehh4863 2 роки тому +2

    thank you so much man, ur the best

  • @janessabaza3865
    @janessabaza3865 2 роки тому +1

    my outputs said they were undefined, help

    • @MyCodingJourney318
      @MyCodingJourney318  2 роки тому

      Well, I need to know the context...
      if you are trying to setText... do this on the right input for the setText block "" + yourList or element.

    • @monrovaproductions2667
      @monrovaproductions2667 2 роки тому

      @@MyCodingJourney318 i’m also having the same problem

    • @Bruhbruh01938
      @Bruhbruh01938 2 роки тому

      @@monrovaproductions2667 have you figured it out?

    • @mackinthemoon
      @mackinthemoon 2 роки тому +6

      @@Bruhbruh01938 dude im doing the ap computer project and i havent finished and its due monday

    • @Bruhbruh01938
      @Bruhbruh01938 2 роки тому +1

      @@mackinthemoon LOL me too

  • @nnamdiakanno6560
    @nnamdiakanno6560 11 місяців тому +1

    Thanks bro

  • @AlexPark-c3l
    @AlexPark-c3l 11 місяців тому

    I LOVE YOU

  • @sebasilisk1726
    @sebasilisk1726 Рік тому +1

    Hello i was wondering what to do if you have two dropdowns and need to filter both at the same time to combine the output.

    • @Mason-jg1vc
      @Mason-jg1vc Рік тому

      IM DOING THE SAME THING

    • @MyCodingJourney318
      @MyCodingJourney318  Рік тому

      So I'm going to write pseudocode:
      if element < option1
      if element == option2
      append element to filter list
      Nesting if statements make its easier to write code apparently... students sometimes struggle using the compound or logical operators &&, ||:
      if element < option1 AND element == option2:
      append element to filter list