What I’m trying to do:
I am trying to display a table of unknown length on a data grid with a repeating panel. The table should have hyperlinks to different websites, but they are just showing up as plain unclickable text
What I’ve tried and what’s not working:
I’ve tried using Markdown but it still just displays as plain text.
I also tried this article but couldn’t get the binding. Link
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
results_df.loc[len(results_df.index)] = [domain, ‘False’,f’Account covered by active user’, owner_name,f’Salesforce’,’’,’’]
list_of_dicts = results_df.to_dict(‘records’) # converting to list of dicts
for d in list_of_dicts:
print(d)
app_tables.master_output_table.add_row(**d)
Clone link:
share a copy of your app
Code Sample is not intended for some random body of code. Rather, it’s to show us the code that is relevant to the problem. So far, I don’t see any connection between the code provided, and the problem
that you describe.
It would be really helpful to see the code, preferably a clone, that actually shows the relevant part of the app. Then folks here would be able to see enough of what’s going on, to have a good chance of helping you.
It doesn’t have to be the entire App, just the relevant parts, i.e., the parts involved in the display of the links.
@p.colbert I cloned the app please see below
https://anvil.works/build#clone:KKK5UKZDIHHGURDZ=3FUC4E5EXBYRHKRF4OK6PMYN
The code I pasted in my first post shows adding the link to the table in markdown which is later displayed.
The part involved in the display of the links is just assigning the table to the repeating panel.
“”""""
def init(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
self.repeating_panel_1.items = anvil.server.call(‘get_output’)
Here is a clone of your clone with an example of how to get the links working
https://anvil.works/build#clone:QF4ZI2I4EI5XFQZ7=RJCUCBFGDRCXQVXFKKEXQGUF
I added a link component to one of the columns and add two data bindings to that link component:
- url = self.item[]
- text = self.item[]
The data table item itself is plain text. You have to add it to a component to make it useful
3 Likes