Is there an example to show a data table based on some filter in a custom HTML block?
Are you looking to use a filter on data that the queries associated with the Custom HTML Block provide?
There are also examples provided in that documentation on how to use the data associated with the dashboard block as well.
Thank you,
Heath
Yes, I can get all rows ok. But not sure how to add the filter query with Dasboard rendering
Can you provide some additional information to help us assist:
-
What variables specifically are you trying to filter against in your data table?
-
Are you trying to implement a filter within the custom HTML body content or use the data query settings within the configuration of your HTML block?
-
Would you be able to provide a few screenshots of what your current configuration is, that will help me guide you to some next steps.
Thanks,
@Aidan_Zebertavage
On this, I don’t want to use the filter. However, I want the filter done in the custom block code below
so that the query can be built dynamically … on the first line in renderBlock function …
Thank you for the additional information.
When using a Custom HTML block to render a table, the queries and query areas of the configuration allow you to define the data sets to be included in your data table, and you can use ctx variables within these queries to better refine the data sets that are included in your table.
However, as I understand it, your particular use case requires you to develop this filtering within the code block itself. To perform this you will need to write your own custom Javascript code. I don’t have any specific examples to point you to within Losant.
There are some great resources out there to help navigate and develop using the Javascript language:
https://eloquentjavascript.net/
Thanks,
@Aidan_Zebertavage