Data Viewer List change colour

I am making a chat app between 2 users.
How can I change the colour of either the title depending on whether each row in my data viewer list contains the word “Patient”?

The title’s text is under “Sender Name” in my database, hence I tried to do it in a way that scans for the word “Patient” under the “Sender Name” column in my database for each row, and if it does exists, then the colour of the text should be red.


However, the colour of the text remains unchanged.
This is a screenshot of my blocks:

Note that ‘app variable patient name’ is set to “Patient” currently.

Thank you for taking the time to help me.

You are using j as a row id but it isn’t one. You need to provide the row id or integer row number for the row you want to change the color of.

One way to do that is to use a counting variable that starts at 1 and increases by 1 each time the loop iterates.

thanks for your response! do you mean something like this?

the text colour didn’t change so I am not sure which part went wrong…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.