Working around missing values in arrays
Hi --
Arrays are great for puling values from all related items. However, you need a 1-to-1 correspondence between two arrays, or (ifyou'll get an offset between index numbers, thus values.
Of course, you can make a field required and enter a default value, but ti's potentially very tedious with text and number fields.
You can otherwise use calculation fields to come up with a dummy value if field value is missing, but it's cumbersome.
I was wondering how it would be possible to work around this at the final calculation field level. Meaning that:
- @All of arrays will be pulled
- These would be filtered to exclude items with missing values in all arrays
- ...which would be turned into new “clean” arrays
- which could then be used safely
This or being able to turn missing values into null or something, but at the final calculation level (not source apps).
Any workaround to this?
-
Hi Rainer
Thanks for your interest and also your forum posts in other questions. I did some research and reading on the forum the past few hours and thanks to your hints/advices to other users I was able to figure out my own solution:
I created a calculation field in my referenced app where I copy the value of the potentially empty field and in that calculation field I check if the field is defined using the null operator:
@hours == null ? -1 : @hours
-1 is my special value indicating that the hours field is not defined/set in this item.
Consequently, when I reference the calculation field in my "main" app the returned array is always consistent and I can check against my special value if the field value was set by the user.
Volker
-
Hi Rainer
I've learnt by now that a lot of "helper" fields in Podio are sometimes needed in order to accomplish a specific task. But I haven't come up with a smart way yet to let the user know, that these "helper" fields are nothing to worry about and that it is safe to ignore them. Unfortunately, Podio does not allow (yet?) to hide fields, even when they're not empty....
Volker
-
Hi Volker,
you mean something like this?
How do do it, I've described here (last comment) https://help.podio.com/hc/en-us/community/posts/205901428-horizontal-line-between-fields
Please sign in to leave a comment.
Comments
9 comments