0% found this document useful (0 votes)
872 views14 pages

Podio Calculation

The document provides tips for using calculations in Podio, including examples of conditional calculations using if/else statements to show different outcomes based on field values. It also gives examples of calculations involving dates, numbers, text, and relationships between apps. Calculations can perform various functions like summing values, concatenating text, estimating dates, and more.

Uploaded by

Luiz Henrique
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
872 views14 pages

Podio Calculation

The document provides tips for using calculations in Podio, including examples of conditional calculations using if/else statements to show different outcomes based on field values. It also gives examples of calculations involving dates, numbers, text, and relationships between apps. Calculations can perform various functions like summing values, concatenating text, estimating dates, and more.

Uploaded by

Luiz Henrique
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

PodioCalculationTips

InthisguideyoufindsomeusefultipsonhowyoucanusethecalculationfieldinPodio.
We have included some examples of how the calculations should look. When you copy in
the string into the calculation field, make sure to reference the right fields, use the @
symbolandstarttypingthefieldname.
When you would like to reference values inacalculation fieldfromotherapps,then firstyou
havetohaveanincomingoroutgoingrelationshipfieldthatconnectsthetwoapps.
Please note, you will need to save the app template first when making modifications that
require the use of the @reference within the calculation. Once the template is saved, you'll
beabletoaddyourcalculationandreferencetherelevantfieldsusingthe@symbol.

Conditionalcalculations
Ifstatement
Use: Evaluate a statement as either true or false and then show different outcomes in a
calculationfieldbasedonselectedcategorieswithinacategoryfield.
Example: If you use a project and a deliverables app and would like to calculate in your
project app the sum of approved deliverables from your deliverables app, you can set the
following calculation up in your deliverables app to show only the budgets that have been
approved. You would need the following fields in your deliverables app, a number field for
the budget, a category field to indicate whether its been approved or not, and acalculation
field for the calculation that will only show approved budgets. In this example we wouldlike
to use and reference the Approved Budget calculation field from the deliverables app,
within the projects app. Toachievethisweneedtoensurethatthetwoappsarerelatedwith
arelationshipfield.Thiswillallow ustousethe@symbol(intheProjectsapp)topullinthe
variables (from the Deliverables app). We can then add a calculation field in your projects
appandusethe@SumofApprovedBudgettoshowthecalculation.
Note: Using the
@Sum of command will pull in variables from number type fields(money,
numbers, calculations that display numbers, durations, percentages, and progress fields).

When setting the calculation up take note that @ will displaythenameofthenumbertype


field.InourexamplewevenamedthisfieldApprovedBudget.
It is also possible to use the @ symbol top
ullinvariablesfromtextfields.Calculationswill
output data in one of three different types: Number, Date, or Text. The output type is
determined the first time you save your calculation field, based on what your calculation
returns.
Calculation:
if(@Status==="Approved"){
@Budget
}else{
0
}

ApptemplateinDeliverables:

Elseifstatement
Use:Youcanspecifyanewconditionifthefirstconditionisfalse.
Example: In this scenario we would like tocalculatethepriceincludingVATwherethereare
two VAT variables, VAT A and VAT B.Forthiscalculationweneed fivefields:amoneyfield
fortheprice,twonumberfieldsforeachofthe VATvariables,acategoryfieldtoselect which
VAT variable we would like to include in the calculation, and finally a calculation field to
perform the calculation. When we want to calculate the price including VAT A we can then
simply select VAT A in the category field to trigger the calculation and return a price that
includesVATA.
Calculation:
varcategory=@Typeoftax
varprice=@Price
if(category=='VatA'){
price*(1+@ValueofVatA)
}elseif(category=='VatB'){
price*(1+@ValueofVatB)
}else{
price
}

Apptemplate:

Ifandstatement
Use:Youcanspecifymoreconditionsthatneedtobemetatthesametime.
Example: In this scenario we work on some customer projects and we would like to bill our
customers only for those hours that have been approved by our manager. In our app
template we have included four fields: a category field toindicatewhetherthehoursworked
are considered billable, a duration field to log the hours spent onthetask,anothercategory
field to indicate whether the task has been approved by a manager or not, and finally a
calculation field to show the billable hours. In this example weve named these fields
Approved, Billable hours, Hours worked and weve named our calculation fieldBillable
hours. This calculation willonlycalculatebillablehoursifbothcategoryfieldshavetheyes
boxchecked.

Calculation:
if((@Approved==="Yes")&&(@Billablehours==="Yes")){
@Hoursworked
}else{
0
}

Apptemplate:

Calculationswithtextfields
Concatenatetwotextfields
Use:Displaydatafromtwotextfieldsinacalculationfield.
Example: Showacontactsnameandcompanyinonefield,dividedbyacomma.Youcanof
courseuseadifferentseparatorbychangingthecommatosomethingelse.
Calculation:
@Name+','+@Company

Apptemplate:

Result:

Concatenationwithnullvalues
Use: In order to concatenate two strings together where one or both mayhaveanullvalue,
usethiscalculation.
Example: In this scenario we have two separate text fields (name and company) that we
would like to have displayed together in a single field. This can be achieved by using a
calculation field. We would also like the calculation toomitany emptyfieldsandnotreturna
6

null value in the concatenation. We set this calculation up to show values only from those
fieldsthatcontainavalue.
Calculation:
if(@Name&&@Company){
@Name+","+@Company
}elseif(@Name){
@Name
}elseif(@Company){
@Company
}else{
""
}

Apptemplate:

Calculationswithrelationships
Numberofrelationships
Use:Ifyouwanttoknowhowmanyrelateditemsyouhaveattachedtoanitem.
Example: In this scenario we would like to rank projects in our projects app based on the
number of deliverables (in our deliverables app) attached to each project. This is possible
7

because we have related these two apps using a relationship field so we can pull in the
variables from related apps using the @ symbol in the calculation. We can then use this
calculationtogetafigureonwhichwellcreateareporttosaveto ourworkspacehomepage.
Our calculation counts the deliverable titles attached to a project. Here Deliverable title is
thenameofthefirstfieldinyourrelateditems(intheDeliverablesapp).
Calculation:
@AllofDeliverabletitle
.length

Apptemplate:

Result:

Calculationswithdatesandnumbers
Durationbetweentwodates
Use:Youcancalculatethedurationbetweentwodatefields.
Example: Inthisexample wewould like tocalculatethedurationindaysof acompletedtask.
We canachievethisbyusingacalculationfieldandtwoseparatedatefieldsforthestartand
end date. We canthensubtractthestarttimefromtheendtime. Thecalculationwillreturna
result in milliseconds so we also need to add a division in the calculation for seconds,
minutes,hours,anddays.
/1000seconds
/60minutes
/60hours
/24days
Calculation:
(@Endtime@Starttime)/1000/60/60/24

Apptemplate:

Estimateenddate
Use:Estimateenddatebasedonaduration.
Example: In this scenario we would like to calculate an expected end date based on a
startdate and the expected durationfortheproject.Weneedthreefields:adatefieldforthe
9

start date, adurationfieldfortheestimatedduration,andthecalculationfieldtocalculatethe


estimatedenddate.
Calculation:
d=newDate(@StartDate)
d.setDate(d.getDate()+(@EstimatedDuration/24))
moment(d).format("DD/MM/YYYY")

Apptemplate:

Decimalvalues
Use:Youcandeterminehowmanydecimalstoshowafteranumber.
Example: In this example we would like our calculation to omit decimals. In the calculation
weve added .toFixed(0) the 0 in brackets indicates that no decimals will be shown. You
canreplacethe0withanumbertoindicatehowmanydecimalsyouwouldlikedisplayed.
Calculation:
"$"+(@Purchase1+@Purchase2+@Purchase3)
.toFixed(0)

10

Apptemplate:

Otherusefulcalculations
SectionDivider
Use:Createdifferentsectionsinyouritemtogetabetteroverviewofyourdata.
Please note, this is a workaround and therefore it is not supported well on mobile. Its also
worthnotingthatcalculationfieldsdonotworkinwebforms.
Example: In the calculation field, it is a prerequisite that you reference a field in an app.
Therefore you will need to use a dummy variable. Intheexamplebelowweveusedourtitle
field as the dummy variable. The dummy variable can be any random field inyourtemplate
and "CUSTOM TEXT" can be anything you want as the section title. You can also give the
calculationfieldaname,inourexamplewenameditSECTION.
Calculation:
vardummy=@Title
"#CUSTOMTEXT\n"

11

AppTemplate:

Result:

SyncedUniqueIDsacrossapps
Use: Create synced unique IDs across apps (A001 B001). The number digits are the
same across the related app items, just the first letterchanges accordingtothenameof the
app. The 3digitsarebasically theuniqueID(it'ssettohave3digits,soinsteadof1,it's 001,
soitcanbeeasilyrankedinExcel).
Example: A quote turnsintoajob, thatturnsintoadeliverableetc.andwewouldliketokeep
the same reference number across the apps, just with a different prefix, so we can easily
track the different items. We havetocreateacalculationfieldinAppAtodisplaytheUnique
ID,sowewillbeabletoreferencethisinthecalculationinAppB.
Calculation:
AppAreferencenumber:
varpad="000"
varn=@UniqueID
varresult=(pad+n).slice(pad.length)
"A"+""+result

12

Apptemplate:

AppBreferencenumber:
varpad="000"
varn=@AllofUniqueID(AppA).toString()
varresult=(pad+n).slice(pad.length)
"B"+""+result

Apptemplate:

13

Limitations
Calculationfieldsareonlyupdatedwhendatainthefieldstheyreferenceisaltered.
As an example, the calculation x + y will be updated every time x or y changes. Now
consider the calculation: Current hour + x. The intent of this calculation is to show 9 + x
when the time is between 9:00 and 9:59, 10 + xwhenthetimeis between10:00and10:59,
etc. The problem is that the calculation will only be updated when x changes. If x does not
change,thenthecalculationfieldwillshowwhateverthehourwaswhenxlastchanged+x.
The reason for this is to avoid updating calculation fields all the time. Keeping such
calculationsuptodatewouldrequireanenormousamountofcomputingresources.
Alternatively, you can setitupthroughtheAPIorsetupa"Currenttime"appwhereyoucan
updatethecurrenttimethatupdatesallthereferencedcalculations.

14

You might also like