Displaying List Data from Table

So I’m loving the product and I’m really making progress on my app here but my only question I can’t figure out right now is how to get list data from a table object to show up correctly in a repeating panel label as plain str objects and not a list, see screenshot below. I’ve tried using the list comprehension below for the label but still shows it as a list;

[r for r in self.item['genes']]

If self.item['genes'] is really a list of strings (eg via a Simple Object column), then the following should do the trick to make a comma-separated list:

", ".join(self.item['genes'])

Ah ok doh thanks still learning what things I can do forgot about that

Cool I just thought about this I can also now do the same thing I’m doing for my snake names and create pages for each morph as well where I can outline information about it that I can just populate a db with. Really like how adaptable this system is once I learn the ins and outs of things. So each morph will just be a link they can click on from the my snakes page and I guess I can just make another link to list out all the morphs in a dropdown menu and when you select one it updates the page with the morph information.

I’m assuming I can setup something so when someone clicks the morph link it would just open this page with that dropdown value set to a certain value which would load the page data correctly or am I misunderstanding that as a option?

How I have been doing this so far was like this for the snake names so I haven’t tried to do what I’m proposing yet.

def name_link_click(self, **event_args):
    """This method is called when the link is clicked"""
    form_indv_snake = IndividualSnake(snake=anvil.server.call('get_snake_record', self.item['name']))
    
    get_open_form().content_panel.clear()
    get_open_form().content_panel.add_component(form_indv_snake)

What you’re describing should be possible - just initialise the form with the selected property of the DropDown set to the appropriate morph.

Make sure you set the rest of the components accordingly. I would define a method to call from the __init__ and from the DropDown’s change handler:

def __init__(self, morph, **properties):
  # ... the normal init stuff ...
  self.drop_down_morph.selected = morph
  self.morph_selected(morph)

def morph_selected(self, morph):
   """Update the page based on the currently-selected morph"""
   # ... your code for doing that goes here

def drop_down_morph_change(self, **event_args):
  self.morph_selected(morph)