Default rocket icon when applying formula

Does anyone else is experiencing this bug? (See attachment)
I have a collapsible category menu and want to change the icon the when menu is expanded and vice versa. Everything works as it should (menu is not populated yet but it works) but there seems to be a bug when fresh loading the particular page. The initial icon is the rocket from appgyver documentation. Only when you press it, it changes the way it should be. But when you reload the page it goes back to the rocket.

Hi, I’ve encountered this bug when the icon is set to undefined. It’s possible that your formula doesn’t evaluate correctly when the item hasn’t been tapped yet

Hi Mari,
the icon itself is bound to a pagevar and on tap is evaluating with a IF condition and then set the pagevar.
Maybe I’m doing something wrong here but nevertheless it works. I cannot find anywhere the ‘undefined’ part. Please see attachments.

Does pageVars.IconChangeHotel have an initial value? If not, it’s undefined until the component gets tapped.

Thanks Mari. Problem solved.
Here’s the fix for anyone who encounters the same problem as I did.

When adding a page variable and changing the ‘value type’ to ‘icon name’, you have to click the gear icon and select ‘initialize with a value’ and then set the initial value to the desired icon.

1 Like