Often I find myself needing to find a way to communicate several things to a user for a record. Things like:
- You forgot to create child records that are required for correct operation
- Something needs to be assigned to something
- You still have X number of things to do
- We need a signature
- The order hasn't been paid, it's missing something else, and another thing
Whenever I have a list of things I need to communicate to users, I find myself creating something like what you see above. The list is dynamic, meaning there may be 15 items in the list and it will expand/contract based on how many items are in the list
Here's the formula used
substitute(
list(
if(IsBlank([Related InstPhase_Sections]),
" --> Missing Sections",
"nope"),
if(IsBlank([Installation_Phase_Required_Images]),
" --> Missing Required Items",
"nope"),
if(and(
IsBlank([Related InstPhase_Sections]),
IsNotBlank([Installation_Phase_Required_Images])
),
" --> Need to assign required items to a section",
"nope"),
)
- list("nope")
, " , ",
"
")
Formula Breakdown
--------------------------------------------------------------------------------------------------
There's many different ways you can format your list, the bullet point you use could be an actual bullet point font-image, but I figured I would share this quick method for generating a list of reminders - since I use it ALL the time!
Good one, I like it.
I noticed the fact that it's not a string, instead a list wich makes sense. I don't imagine making all of this out of IFS().
The usage of SUBSTITUTE to change from a " , " to a line break is great, very ingenious.
I like Show columns instead of normal ones for "messages" to the user but I don't know if we can apply a format rule to Show columns. If we do, I'd preffer that route, although I wouldn't be able to reference to this "status" column if I need it somewhere
BTW, you can forget about the "nope" ones if you use IFS() instead of IF() since the last one needs a third argument and the first one doesn't afaik.
Something like this:
SUBSTITUTE(
LIST(
IFS(
IsBlank([Related InstPhase_Sections]),
" --> Missing Sections"
),
IFS(
IsBlank([Installation_Phase_Required_Images]),
" --> Missing Required Items"
),
IFS(
AND(
IsBlank([Related InstPhase_Sections]),
IsNotBlank([Installation_Phase_Required_Images])
),
" --> Need to assign required items to a section"
),
" , ",
"
"
)
Or is it that IFS() that are False produce blank instead of nothing and you would need to remove the blanks anyway?
Sure, but I prefer to easily see things - especially when I'm sharing a formula for others with less understanding of the ins-and-outs. It's clear a dry what's happening with the fallbacks and removing them from the list; if I used blanks it's not as clear. 😉
Just remember to remove the blank option from the list!
Yeah, I noticed that when I was writing it! Thanks
@SkrOYC wrote:I like Show columns instead of normal ones for "messages" to the user, but I don't know if we can apply a format rule to Show columns. If we do, I'd prefer that route, although I wouldn't be able to reference to this "status" column if I need it somewhere
Formatting rules on Show columns = true (^_^)
applying formatting rules to a Show(Text) column in AppSheet
But yeah, then you can't reference back to the notice column for things.
I like to use the presence of anything inside that notice column as an easy way to tell if something should be in a certain status: IsNotBlank([Warning/Notice_Column])
Bonus if you've got the "preview new options" turned on for your app
Turn the LongText type into "HTML" and use the following formula instead:
concatenate(
"<ul>
<li>",
substitute(
[YOUR_LIST_HERE],
" , ",
"</li>
<li>"
),
"</li>
</ul>"
)
Formula Breakdown
This is amazing! How do we add multiple columns of related list. ex: [related comments][comments] just returns list of all related comments. What if I need multiple columns of related column ? Name and comments of same row ? How can we do it ?
I meant Something like this.
@Rifad wrote:
How do we add multiple columns of related list.
Your question sounds similar to the following recent post: Re: iterating over child rows to create a string - Google Cloud Community . Maybe the technique mentioned there addresses your need.
Oh and here's another way (if you don't want to include the bullet inside the list item itself)
concatenate(
" -->",
substitute(
[Tmsht_Remaining_Users_Need_Timesheets][Name],
" , ",
"
-->"
)
)
Helpful for creating a nice derivative list for display
Why are you doing it that way, instead of just:
IFS( x , "text
")
&
IFS( y , "other text
")
&
....
?
As I said before....
(^_^)
Yah but there must be some reason why you chose a more complicated approach. Does it offer some benefit?
Well, from my POV, you can manipulate list on ways that text can't, you would need to change it to a list before hand. You know this but as examples you can count, index, intersect, sort, etc
Being able to count the reminders can be helpful, but honestly @Marc_Dillon I've done it your way as well.
- I gave it a think, and I honestly can't come up with a good reason why I did it this way
- Simply a matter of that's what my mind settled on when I needed to make a list of reminders
“¯\_(ツ)_/¯“
Fair enough 😉
I would prefer show type instead of longtext. Show type get's calculated when you open the view. It is not calculated on sync. So you can save sync time.
I remember why I use the long text column over the show column....
With the long text, there's actual values inside the column - which means I can base functionality off of that fact alone.
IsNotBlank([Reminders])
IsNotBlank([_This])