Pulling URL's and Duration fields from one app to another - HELP
Hi
We want to be able to pull a couple of fields from one app into another but cant seem to do it,
- URL field using YouTube links but so the video actually embeds in the other app, at the moment we can only get the URL itself pulled in.
- Duration field using Min / Secs, again we have tried a calculation field but its not pulling in the correct info
Any help with this will be greatly appreciated...
Justin
-
Hi Justin,
durations are parsed to hours in the calculation field: 1 day in duration field would be in the calculation field @duration -> 24 (hrs), 3 Minutes 12 Seconds in duration -> 0,0533 (hrs). You have to parse it to the time units you want. In your case (e.g. for 3 Minutes 12 Seconds in duration)
var asSeconds= @sum of Duration*60*60; // hour value * min * sec = 172 seconds
var min = parseInt(asSeconds/60); // divides result of asSeconds and takes only the integer = 3
var sec = Math.ceil(asSeconds % 60); //divides result of asSeconds and takes only the remainder = 12. Math.ceil rounds it up to full seconds
min + " min " + sec + " sec"
The displayed resut would be: 3 Min 12 Sec. "@sum of " you can use if there's only one item related or if you really want the sum of all related items. If there are 2 or more items related and you want to show it for each item you have to use a for-loop.It's not possible to embed the youtube-link in a calculation field so that you can start and watch it in the item. That's only possible in a Link-field. Maybe you can use Podio Advanced -Flows or Globiflow to copy the link form one app to the other.
Rainer
-
Hi Rainer
Thanks for this, i have tried putting this in the calculation field but its not working - sorry I’m not a programmer so I’m not quite sure if I’m doing it completely right to make the inputted time in a duration field in one app then show in another app…?In relation to URL problem i have simply put a URL field under the calculation field which shows the URL then i can just copy and paste, not ideal but it works…Look forward to hearing back from you.Justin
Please sign in to leave a comment.
Comments
4 comments