Is it possible to link directly to another Podio item in a calculation field?
Of course we can link to other items using the reference field. But I was wondering if it's possible to get the link to a related item within a calculation field?
-
Hi Martin,
it is possible. Item-URLs have always the same structure
https://podio.com/organization-name/workspace-name/apps/app-name/items/Unique ID
For creating a link you can copy an exsting URL, the only variable is the Unique ID. For getting it,you need to create a calculation field in the app whose items you want to be linked. Type
@unique id
into this calculation field and you get it.In the calculation field where you want to show the link - if always only one field is related:
var id = @All of calcField with uniqueID.join();; var name = @All of titleField.join(); // or another field "[name](https://podio.com/organization-name/workspace-name/apps/app-name/items/" + id +")"
If there can be several items related:
var id = @All of calcField with uniqueID; var name = @All of titleField; // or another field var url = "https://podio.com/organization-name/workspace-name/apps/app-name/items/" var result = []; for(var i = 0; i < name.length; i++){ result.push("[" + name[i] + "[(" + url + id[i] + ")"); }; result.join("\n")
This would give you a list of all titles of all related items, each title is linked to the item. You could even filter the related items: show only if category field = xyz or if Date is greater than ... or if a number in a number field is equal to ... and so on.
There's one caveat: These URLs are hardcoded, means: If you change the name of the app or the workspace, they break.
Rainer
rg@delos-consulting.com -
Hi Rainer or anyone,
thanks for your tip, i was looking for precisely this option, but i am not able to replicate it :-( the problem of course that i know very little about programming. I think that its because i am no to sure it i do the right entries :-(
I did a test with 2 apps, one from/ FRA one to/TIL. The idea being that i want to display a link to a other specific app.This is my input :
I seen all the good answers in here therefor my second question is, is there a other way? The challenge being that i have a app where on can input a preference in a web app, and when my colleague is doing the setup, she will not only have the setup preference, but also a permanent link to the app with the setup information in ? -
Hello Hans,
your line "[name]( ....)" doesn't make any sense.
First mistake: the word "name" (in []) is a variable (which you've declared in the line before by: var name =) . Variables must be separated from other text strings (and also from numbers and other variables ) by a +. The right syntax is:
"[" + name +"](https://....).
Second mistake: What's the reason for: /" + 1 + "?
"htps://podio.com/..../items/1" is the url for the item with Unique ID 1 in the app flyt-fra.I also don't understand why you use .join(FRA1) in the variables.
Maybe it's easier you describe what you wnt to achieve and I try to help you.
One tip for getting the URL of an item: It's easier if you create the URL in the item you want to link to. In the app flyt-fra open an item, copy the URL, click Modify Template, add a calculation field (named e.g "Flyt-Fra-URL") and enter "[" + variable + "]( , paste the URL, enter "+ @Unique ID + ")" . Remove the last number in the URL
Then above this line enter var name = moment(@date).format("DD/MM/YYYY")
(I assume you want the date as name. For that you have to format the date.)
Then replace the word variable by the word name The result should be:var name = moment(@date).format("DD/MM/YYYY");
"[ + name + ](https://podio.com/qloackzero/company/apps/flyt-fra/items/" + @unique ID + ")"Now in each item of this app you have the Link for this item (it's show like 24/12/2016). In the other app (and also in other related apps) you can pull the URL into the calculation by
@All of Flyt-Fra-URL.join()
In you only need the link (w/o a name) enter in the field "Flyt-Fra-URL" :
"(https://podio.com/qloackzero/company/apps/flyt-fra/items/" + @unique ID + ")"
Then you can decide in each other app which name you want to add to the URL.
For your second question: Are the apps "Setup" and "Setup Inforamtion" related by a relationship field?
Rainer
rg@delos-consulting.com
Please sign in to leave a comment.
Comments
5 comments