Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table which has a lot of columns (90 columns) and need the all columns displayed in a straight table because offering to download its entire data source for people visiting dashboard. Adding them by one by one manually is time consuming task. That's the reason why I'd like to do it by using chart level scripting.
What makes you think Chart Level Scripting will make this faster than adding the measures manually? And why is it particularly time-consuming to add 90 measures to a single table?
If anything, for a time-saving measure, I'd look at creating this table using API. But even then, I doubt you'd save any time over doing it manually if it's just the one table.
Thank you for your response.
I think I need a lot of efforts in the following aspects:
I haven't had an idea using API for this purpose. Thanks. Do you think it's still better way for doing manual steps to achieve my purpose.
I've created larger tables in the past (we also have the need to allow users to export every column in the app) and it's never been much of a problem. In particular, if your expressions are simple e.g. Sum(Field), you can use the new Straight Table available from May 2023 version to mass-add your fields rather than doing it manually. Additionally, if it's just a data export requirement, you can often get away with adding the field as a dimension rather than as a measure, which saves time.
Insofar as your bullet points:
* You'd need to make sure configuration is correct using chart level scripting or API, as well. Ultimately you need to be sure the expression is written correctly no matter what method is being used to add it to the table.
* I don't follow why changing the table name requires changing anything else.
My question is based on the following idea using for-loop to populate column recursively without any knowledge of chart level scripting. If this kind of logic works, I thought it can be simpler approach than manual work.
for i = 0 to (# of data table columns)
column_name = (retrieve name of column[i])
add_column(column_name, <data of column[i]>)
If this is all you're trying to do, just use the new Straight Table object to mass-add all the fields to a table as dimension fields. It should take less than a minute to do this, so even if the field names change later, it won't require significant upkeep.
Ok I'll do further work as following your advice.
Many thanks, Or 🙂