Dynamically Set an Action Icon with a Format Rule

I never knew until today that you could dynamically set (or rather, change) an Actionโ€™s icon with a Format Rule.

Just posting in case other people hadnโ€™t realized this as well.

3X_8_8_887787775fb7da6d54fffb832242ac8742abbb6c.png



3X_3_8_384a4cc8c8ac4c3bcda62b0bba1f707f841b3106.png

Wowโ€ฆ just wow.

11 9 1,574
  • UX
9 REPLIES 9

BTW I also literally discovered this 2-3 days ago when I saw action buttons of different colors

Hi @Marc_Dillon thank you for sharing this. You can also add some dummy actions

I use this in a deck view. So that the action buttons always stay at the same place.

3X_b_f_bfd4f4b608a9bcbe9f003b79dbf3afff83b7c92d.png

Yes. Glad you found it. You can use your Tip to create โ€œToggleโ€ Actions assigning a different action and icon IN THE SAME SPACE.

For example, letโ€™s say you want to go to different Forms based on Status - New, Working and Complete. You could create a Group of Actions each with the behavior set based on Status such that only one of those actions is activated. Or you could create a single action with an expression like:

IFS(
   [Status] = "New", LINTOFORM("Form1",...),
   [Status] = "Working", LINTOFORM("Form2",...),
   [Status] = "Complete", LINTOFORM("Form3",...)
)

The real beauty is that in both action designs above you would be able to create Format Rules, one for each [Status], and set a specific icon and even color. Essentially creating 3 different actions. Of course this only works in cases where you would show exactly one action at a time!

This โ€œToggleโ€ button design works everywhere EXCEPT in a Card view (see below), but is especially useful for Inline Actions where row space is at a premium! The same โ€œmainโ€ action button can now behave like three different buttons but within the same Action button space - i.e. in an inline view you do not need multiple columns.

NOTE: Applying the Format Rule to an action on a Card View has unexpected results. Instead of replacing the icon like in other app areas, the Format Rule is applied as a โ€œhighlightโ€ as is normally done with column values. See the bug post below

I was thinking about that when I was searching for different colors on action buttons. Now I also understand how @MultiTech_Visions made the โ€˜checkboxโ€™ action (Iโ€™m right?)

Thatโ€™s why I posted this topic about better AppSheet Documentation

This kind of info should be inside the official docs

Can you post the link please?

After a search, this seems like a good one

I donโ€™t remember where I asked @MultiTech_Visions abou it, he showed a video about other thing and I saw the checkbox on Inline.

Very helpful for in-line actions - meaning an action you see inside a table (for example)

  • Instead of having space for 3 actions, now it only takes up 1.
    3X_c_8_c894633685b607dcad8bd19f28d5c98f0a09a31f.gif

Can someone confirm that format rules don't apply to action icons from an inline view with a view type card and layout as list?

I discovered that if you have only one action defined and the other 2 set to none that's action icon appears instead of the three dots. I want to have a format rule thats changes the icon but currently its not applying the rule. I changed view types and the formatting is working just not in the above mentioned condition.

I can't confirm, but I wouldn't be surprised if format rules don't work properly with card views. Card view were never fully baked and were released way too soon, and development on them has fallen into maintenance mode, so fixes to the current oversights are unlikely to come soon.

Top Labels in this Space