Need help with mobile prototype! [Kind of urgent?]

Hey, I’m really struggling with a certain part of my application prototype.
Basically, I am looking to create a new food item in the “My Fridge” section every time one is added through the add button on the top right, so a user can keep track of their food. As you can see I have played around under the “add to fridge” dynamic panel and managed to get it working for the first item, however, every item after that just overwrites the first one? Please help! Thanks :slight_smile:

axure 2.0.rp (1.6 MB)

bump need help with this :frowning: ?

I haven’t got a quick, easy or perfect answer for you (I’m not a super-experienced user, tbh), but two ideas for you to think about:

  1. name all your objects with something unique. It will make your life a lot easier when you are trying to figure out what is happening. For instance, the text field in your second "FOOD " dynamic panel shows up in scripts as “(rectangle)”. You might help yourself by calling it “food name 2.”
  2. In my quick—possibly too quick—analysis, it seems like maybe you are using the variable “CB1” as some kind of toggle to determine which text field to fill with a new entry, is that correct? Where are you setting the value of CB1? And for that matter, where is the variable CB1 created? It does not show in the global variables list, so perhaps it is out of scope (i.e. for practical purposes it does not exist) at the time when you test for it.
  3. (this advice may be too complex for your current need, feel free to ignore: ) What about using a repeater to display your food list, and adding a row to the repeater when the user clicks “add”?

I may not be back online any time soon—you mentioned that this is ‘kind of urgent’—to see if my advice has been helpful, apologies. But good luck. The more I think about what I saw in your code, the more I think my second idea above is the one you need to pursue.