Page 1 of 1
Creating a view in tm1 using Excel or Excel VBA
Posted: Thu Jul 07, 2016 4:23 am
by initm1
Hi everyone,
Is there a way to create a view in tm1 using Excel or Excel VBA?
Problem statement: there are some view which cannot be made public because there will be too many view then. So some views remain private only. Now whenever anyone shares their private view I want to use that and replicate it in tm1 using any method if possible.
any help and advice will be great.
thank you.
Re: Creating a view in tm1 using Excel or Excel VBA
Posted: Tue Aug 02, 2016 2:53 pm
by initm1
If anyone is looking to create something like this there is no options like this. This thread can be closed.
Re: Creating a view in tm1 using Excel or Excel VBA
Posted: Tue Aug 02, 2016 7:43 pm
by Alan Kirk
initm1 wrote:If anyone is looking to create something like this there is no options like this. This thread can be closed.
There's no such thing as a closed thread on the Forum. And it CAN be done in multiple ways, but the question is whether it's too fiddly to be worth it which is probably why nobody has replied before this:
(a) In terms of VBA macro functions, the absence of a "VUCREATE" macro has always struck me as odd. (Though in reality it would probably have needed to be a suite of functions, as is the case in TI.) You can create a subset, you can create an entire cube, but you can't create a view other than as a flat text export one which gives you no control over the positioning of the dimensions.
(b) However the API gives you the full ability to create a private view. However you would obviously need to be able to read the source view, and the creation would have to be done by the client who is receiving the view, not the one who is sending it. (The API can only manipulate the private objects of the current client, not any other client.) I wouldn't recommend it, but if you find some way of exporting the source view (I can think of a few, none that I'd call "elegant") it's
technically possible.
(c) TI doesn't do that; it won't create private views. But what it CAN do (with a little help from some server-side scripting) is copy .vue files from one user's database folder to another user's database folder, though it would most likely need to read the file as well to see if there are any named subsets that need to be copied. While public views are read at server startup, private views are read when the user logs in meaning that if they are copied during a session then the next time the target client logs out and back in the views will be there. You would also need to ensure that this would not obliterate target users' own views which might coincidentally have the same name, or they will not be at all happy. ("Tagging" the copied .vue names with the name of the source client would be a way of doing that.) The TI process can of course be called by an action button. I've done this sort of thing a bunch of times by manually copying one user's views to another user's folder, but it's never been something that I've needed often enough to automate.
Have fun...
Re: Creating a view in tm1 using Excel or Excel VBA
Posted: Wed Aug 03, 2016 4:51 am
by initm1
Perfect... this information is very useful. Thank you!
