URL API

Post Reply
Ivan Cepero
Posts: 10
Joined: Fri Oct 03, 2008 7:19 am

URL API

Post by Ivan Cepero »

I'm having trouble using the URL API. I want to open a cubeview and set the title elements. I can set all title elements except the cost center dimension.

Here's the URL I am using:

Code: Select all

http://localhost/TM1web/TM1webmain.aspx?action=OpenObject&type=CubeViewer&value=tn_5&title_Entity=10 - US&title_Version=CurrentForecast&title_cost center=1010 - Manufacturing - Instruments&title_Account=7600-6046 - Meals
The only difference that I can see is that the cost center dimension name has a space in it. I have tried using title_cost%20center= but that doesn't work either.

Does anyone know what's wrong with the URL?
User avatar
Martin Ryan
Site Admin
Posts: 1989
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: URL API

Post by Martin Ryan »

Ivan Cepero wrote:&title_cost center=1010 - Manufacturing - Instruments
Try making it "title_cost_center". Variables can have spaces, but I don't think the variable names can.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: URL API

Post by rmackenzie »

http://localhost/TM1web/TM1webmain.aspx ... _Entity=10 - US&title_Version=CurrentForecast&title_cost center=1010 - Manufacturing - Instruments&title_Account=7600-6046 - Meals
Try this - replacing any space in the URL with %20

Code: Select all

http://localhost/TM1web/TM1webmain.aspx?action=OpenObject&type=CubeViewer&value=tn_5&title_Entity=10%20-%20US&title_Version=CurrentForecast&title_cost center=1010%20-%20Manufacturing%20-%20Instruments&title_Account=7600-6046%20-%20Meals
Robin Mackenzie
Ivan Cepero
Posts: 10
Joined: Fri Oct 03, 2008 7:19 am

Re: URL API

Post by Ivan Cepero »

I tried title_cost_center and replacing every space with a $20. I even built another test cube with a costcentertest dimension. I can't set that title dimension. Weird.
Kyro
Community Contributor
Posts: 126
Joined: Tue Nov 03, 2009 7:46 pm
OLAP Product: MODLR - The CPM Cloud
Version: Always the latest.
Excel Version: 365
Location: Sydney, Australia
Contact:

Re: URL API

Post by Kyro »

I tried title_cost_center and replacing every space with a $20.
Probably a typo but try %20 instead.
Also since your view is possibly saved using aliases (and even it its not) possibly use the elements principal name, the view should present the alias name still if thats how the view was constructed.

so instead of :

Code: Select all

http://localhost/TM1web/TM1webmain.aspx?action=OpenObject&type=CubeViewer&value=tn_5&title_Entity=10 - US&title_Version=CurrentForecast&title_cost center=1010 - Manufacturing - Instruments&title_Account=7600-6046 - Meals
try:

Code: Select all

http://localhost/TM1web/TM1webmain.aspx?action=OpenObject&type=CubeViewer&value=tn_5&title_Entity=10&title_Version=CurrentForecast&title_cost%20center=1010&title_Account=7600-6046
I am just guessing at your element principal names though. I've had a lot of trouble getting URL API working and so I sympathize.

Edit 1: just another thought perhaps also replace '-' with its POST HTML code: '%2D'
Edit 2: wow, just saw the date on your post. sorry. my response is a little expired.
Post Reply