Page 1 of 1

URL API

Posted: Sun Feb 01, 2009 12:45 am
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?

Re: URL API

Posted: Sun Feb 01, 2009 8:16 am
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

Re: URL API

Posted: Sun Feb 01, 2009 12:11 pm
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

Re: URL API

Posted: Sun Feb 01, 2009 8:06 pm
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.

Re: URL API

Posted: Wed Jan 27, 2010 12:33 am
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.