Format rules being applied to all rows despite condition

I have this format rules to show an icon close to the name of a player in my app (name of the player represented by field jogador_nome) if the boolean fields (jogador_gold and jogador_capitao) are true. However, this is not working as intended and applying both icons to all rows (and sometimes just one of them to all rows) whereas it should be applied to a single row.

This is one my format rules as well as the resulting display with the little icon in all rows:

format rule for field jogador_goldformat rule for field jogador_gold

Here is the data...

DataData

...and the test of the expression (which seems to work correctly)

Testing conditionTesting condition

Interestingly, if I view the app with another user, the result is different (i.e, it applies just one of the rules to all rows instead of both rules)

Viewing app with other userViewing app with other user

Any hints on what am I doing wrong?

Thanks!

Solved Solved
0 8 165
1 ACCEPTED SOLUTION

For anybody who can be interested on it, I reached out to Appsheet support (which I didn't even know that existed, but turns out it is SUPER helpful and they replied in a matter of hours) and they looked at my app and told me what is wrong.

Basically my table where the rule was being applied (Equipes) had as a key something that was repeating for multiple lines (equipe_id). When I changed that to make it a combination of 2 fields in a way there would be no repetition, it worked.

View solution in original post

8 REPLIES 8

Save the app and view it as a user in a browser window or from the mobile app, NOT the App Editor. The Editor does not render the views consistently. 

Also, when your browser is consuming a lot of memory, format rules might not work correctly. Restart your browser. 

Hi Joseph,

I've tried both (I actually have been building the app in the editor and testing it on my phone) and none of them worked. Any other ideas?

I've worked with format rules before and they've always worked fine.

It appears you may be using a slice 'Minha Equipe" on the 'Equipes" table? Just to be sure the slice contains the data you expect, please navigate to the slice in the Data view and click "Preview Data" on the menu choices for the slice. In the preview data, do the values for the columns "jogadar_gold" and "jogadar_capitao" look good?

They do look good!

By the way, you don't need [jogador_gold] = TRUE, in your expression. Just [jogador_gold]. 

I figured that, but given it doesn't work, I was trying different things (and yet it doesn't work)

Anybody else has any clue on why this does not work as intended?

For anybody who can be interested on it, I reached out to Appsheet support (which I didn't even know that existed, but turns out it is SUPER helpful and they replied in a matter of hours) and they looked at my app and told me what is wrong.

Basically my table where the rule was being applied (Equipes) had as a key something that was repeating for multiple lines (equipe_id). When I changed that to make it a combination of 2 fields in a way there would be no repetition, it worked.

Top Labels in this Space