AsciiOutput with data source variables

Suggest and discuss enhancements for TM1
Post Reply
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

AsciiOutput with data source variables

Post by Wim Gielis »

Hello all

I regularly find myself typing AsciiOutput statements, passing in all (or many) of the variables from the data source (flat file, query)
Would it be interesting to have a command that would stand for "all data source variables" in the Metadata or Data tab?

For example:

AsciiOutput('testfile.csv',DataSourceContents, ..., ..., ... (your own custom variables) )

DataSourceContents would then be some kind of constant that we can use, giving us the contents of that "record" in the order of the Variables tab.
Or it could be a boolean flag (0/1) as the first argument, whether we want this information yes or no in the AsciiOutput.

Anyone likes this? Or should I just carry on copy/pasting the variables names?

Wim
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: AsciiOutput with data source variables

Post by Alan Kirk »

Wim Gielis wrote:Hello all

I regularly find myself typing AsciiOutput statements, passing in all (or many) of the variables from the data source (flat file, query)
Would it be interesting to have a command that would stand for "all data source variables" in the Metadata or Data tab?

For example:

AsciiOutput('testfile.csv',DataSourceContents, ..., ..., ... (your own custom variables) )

DataSourceContents would then be some kind of constant that we can use, giving us the contents of that "record" in the order of the Variables tab.
Or it could be a boolean flag (0/1) as the first argument, whether we want this information yes or no in the AsciiOutput.

Anyone likes this? Or should I just carry on copy/pasting the variables names?
I like where you're coming from, but am not sure about the implementation there. The problem to my mind is that if the variables in the data source change, the fact that they wouldn't be explicitly used in the code but rather be referred to indirectly through this command could lead to errors which are hard to track down.

I think that this is more of a GUI thing; what would be useful would be a menu command which could insert into the code a comma delimited list of any that you select from the following:
(a) Native data source variables;
(b) User defined data source variables; and/or
(c) Parameters
which would allow the names to be inserted in only a couple of clicks, complete visibility of which ones go into the code, and easy editability of the list (to replace, say, the version name variable if you're moving data from one version to another).

Given the industriousness that has been applied to updating the TI editorsaurus and the minimalist "Who cares if it functions well as long as it looks graphically pretty" Alpha 0.1 version effort that's in Performance Muddler, though, I wouldn't hold my breath for such an innovation.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: AsciiOutput with data source variables

Post by lotsaram »

Alan Kirk wrote:I like where you're coming from, but am not sure about the implementation there. The problem to my mind is that if the variables in the data source change, the fact that they wouldn't be explicitly used in the code but rather be referred to indirectly through this command could lead to errors which are hard to track down.

I think that this is more of a GUI thing; what would be useful would be a menu command which could insert into the code a comma delimited list of any that you select from the following:
(a) Native data source variables;
(b) User defined data source variables; and/or
(c) Parameters
which would allow the names to be inserted in only a couple of clicks, complete visibility of which ones go into the code, and easy editability of the list (to replace, say, the version name variable if you're moving data from one version to another).
Interesting. Vizier has more or less exactly this feature of a graphical UI, tick variables from the variables tab or variables declared on any tab and they are automatically added to an ASCIIOutput. But I have no idea what is happening with that product at the moment.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: AsciiOutput with data source variables

Post by Alan Kirk »

lotsaram wrote:
Alan Kirk wrote:I like where you're coming from, but am not sure about the implementation there. The problem to my mind is that if the variables in the data source change, the fact that they wouldn't be explicitly used in the code but rather be referred to indirectly through this command could lead to errors which are hard to track down.

I think that this is more of a GUI thing; what would be useful would be a menu command which could insert into the code a comma delimited list of any that you select from the following:
(a) Native data source variables;
(b) User defined data source variables; and/or
(c) Parameters
which would allow the names to be inserted in only a couple of clicks, complete visibility of which ones go into the code, and easy editability of the list (to replace, say, the version name variable if you're moving data from one version to another).
Interesting. Vizier has more or less exactly this feature of a graphical UI, tick variables from the variables tab or variables declared on any tab and they are automatically added to an ASCIIOutput. But I have no idea what is happening with that product at the moment.
That doesn't surprise me; in fact when I was typing that reply I was thinking 'Y'know, I'd be prepared to bet that this is in Vizier somewhere...". It's the type of feature that one would think of as an intuitively obvious time saver if one was designing the GUI from scratch.

The key difference is that Vizier, unlike Iboglix, has actually updated its TI editor in a non-superficial way in the years since Lou Bega was in the charts with Mambo No. 5.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: AsciiOutput with data source variables

Post by Wim Gielis »

Thank you for the comments. This won't be in vNext of TM1 I guess :-)
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply