Format the selected row?

I am using a “Selected Row” action and want to indicate to the user the last selected row. Currently, there is a brief flash and the appearance returns to normal. I need it to be persistent.

Thanks.

As you probably already understand, the “Selected Row” property allows you to change the action to take when a row is selected by attaching a custom Action. For example, instead of going to the normal Detail view of that row, you can navigate to a view of your choosing/creation.

We do not have access to the underlying property that tells us which row is currently the activated row. So when you navigate away and come back, in AppSheet we have no direct way to tell that the highlighted row was last selected and apply a format to that row somehow.

However, you can build something. One idea might be that in the custom action attached to the 'Selected Row" property in AppSheet, you can add an action step that saves the row ID just selected into a simple utility table. Then your Format Rule can read that table and apply the format to that row. it will stick until the next row is tapped and updates the utility table.

1 Like

It did not occur to me that adding a record to another table would change the selected row. Your suggestion sounds workable. I will give it a try. Thank you very much!

1 Like

This is not what I meant. I’m not sure how you got that.

Maybe I am mis-understanding. I took your post to say that you want to highlight to the user which row they “acted” on last. In other words, on some main view after the user taps a row and some action is taken, when the user comes back to this main view you want to 'show" the user which row they just tapped on. So if they scroll around on the view they can always see that row they had just selected. At least until they tap the next row!

If I have that right then you’ll need to build something to “remember” which row was just tapped. I am suggesting to do that by recording which row was tapped into a different table. This table may have only the one row which you keep updating with the last tapped row. Your format rule always reads this one table row to get the row ID value to know which row to “highlight”.

Does that make sense?

1 Like

You are correct. I guess more information will always help. The “Action” is a row selected action that adds a row to another table based on what is selected in the current one. To the user, they don’t navigate anywhere. It is intended to provide:

  1. One-click record logging based on their selection and User Settings fields/columns (working).

  2. Stay on the selection table and ready for next record (working).

  3. Hopefully, hi-light the row they selected so as to confirm the selection and keep their place.

Your recommendation sounds good and I hope to get the format rule working today (still learning Appsheet expressions).

Thanks again!

1 Like