Jun 11, 2020 08:48 AM
Hi!
Can someone tell me why my formula is not working?
IF({Rating}=1,
” :star: ”,
IF({Rating}=2,
” :star: :star: ”,
IF({Rating}=3,
” :star: :star: :star: ”,
IF({Rating}=4,
” :star: :star: :star: :star: ”,
IF({Rating}=5,
” :star: :star: :star: :star: :star: ”,
)))))
Basically, I want to convert a lookup value of integers into an emoji.
Many thanks.
Solved! Go to Solution.
Jun 15, 2020 12:47 PM
I’m having a hard time understanding why the first value would ever be null. If K1 is the first child, why would someone bypass the {K1 age}
field and enter the first child’s age into {K2 age}
instead?
Jun 15, 2020 08:41 PM
Hi Justin, because I am not making the k1 age compulsory and if they happen to leave it blank, I don’t want it to appear as a null comma field. Of course, that begets the question why not make it compulsory? I’m still thinking it through…
Jun 15, 2020 09:10 PM
In that case, here’s an alternate way to approach it:
SUBSTITUTE(
TRIM({K1 age} & IF({K2 age}, " " & {K2 age})
& IF({K3 age}, " " & {K3 age})
& IF({K4 age}, " " & {K4 age})
& IF({K5 age}, " " & {K5 age}))
, " ", ", "
)
This will work no matter where the numbers are placed.
Jun 16, 2020 08:17 AM
Thanks again Justin, could I ask, between this new formula and the original one, which will be a greater drain on processing power should we need to host it ourselves?
Jun 16, 2020 08:43 AM
There’s no way to track how much processing power a formula uses. My hunch is that the difference between them is negligible.
What do you mean by “host it ourselves?” Airtable runs completely online. There’s no local hosting option.
Jun 16, 2020 10:14 PM
I suppose there’s the possibility of downloading the data onto a spreadsheet or MS access and have those chug them out if I decide to move away from Airtable.
Jun 17, 2020 06:53 AM
True. However, back to your processing power question, Airtable formulas don’t place any kind of noticeable drain on modern computers. The power required is so small that it’s not even worth measuring, even for formulas far more complex than this.
Jun 17, 2020 07:07 AM
I just had a bad experience with excel on a Mac a while ago. Can’t believe MS excel doesn’t allow multi-core Macs to maximise processing power - only one core will be used for processing. I wrote a very clunky formula. And it took me hours/days to get a response for a whole table.
Thanks SO much for your time on this. So much appreciated.