Rebuilding Websheets Twice in One Event

Post Reply
bgregs
Posts: 77
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Rebuilding Websheets Twice in One Event

Post by bgregs »

Hi Everyone,

I recently came across an interesting situation where I had an Active Form with 2 tm1rptrow columns, one of which was based off of the results of the first tm1rptrow function. I saw a few posts discussing how this either wasn't possible, or there were some workarounds dealing with temporary storage cubes, but nothing as dynamic as I was hoping. This very well may already be common knowledge, but on the off chance that it's not, I figured I would share in case anyone else encounters the same issue.

The 2 tm1rptrow dimensions were built as follows:
1) Org - built by a static MDX query at the top of the Active Form to return results based off of a user's wildcard search in the websheet
2) Level - needed to return values specific to the Org element, as well as being in the correct order (static MDX query would not suffice)

My workaround was to dynamically build an MDX statement on each row (in a hidden cell) that would identify which subset of Levels needed to be returned based on the organization. That's fine, but in order for it to take effect, I had to click the "rebuild" websheet button twice. That's almost there, but not quite.

What I found that seems to work is to create an Action Button that rebuilds the websheet, and then opens "another websheet" (which actually opens itself). This effectively rebuilds the sheet twice; once on the button click event, and the second when the websheet opens itself. This allows the websheet to rebuild twice, and allows for a tm1rptrow function to dynamically base itself off of another tm1rptrow function, all in one single event.

I don't believe this method will work for more than 2 tm1rptrow functions, but who knows, maybe there is a way. ;)

The screenshots show my Action Button configuration. You will just have to take my word for it that the sheet calls itself, since I didn't want to list any websheet specific information on here. :D
Attachments
graphic2.png
graphic2.png (20.38 KiB) Viewed 1556 times
graphic1.png
graphic1.png (13.25 KiB) Viewed 1556 times
Wim Gielis
MVP
Posts: 3113
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: Rebuilding Websheets Twice in One Event

Post by Wim Gielis »

Interesting, thanks for that.
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