I added two favorite components that toggles from visibility based on if a user favorited a certain business but it doesn’t seem to be working correctly. In some instances, it doesn’t show up, in others, the favoriting seems to be a bit delayed. I click ‘Add to Favorites’ and it doesn’t change to Favorited, or takes a while to, but when I unfavorite it, it doesn’t change back to Add to Favorites.
You can see it’s not even showing up here, it should be above the ‘Share this Business’ text.
When a component is greyed out like that, it usually means that it has no column to write to.
Check the configuration on the component, and make sure the target column exists, and there is at least one row in the destination table.
Other than that, I’m not sure what the problem could be.
The thing is that will add a new set of Row IDs and I need for them to be the same as the main sheet. This is an public sheet created from an array from a main (private) sheet.
The “RowID” that you’re pulling in via the arrayformula isn’t really a true RowID column in the Glide sense. It’s just a copy of the RowID’s from another sheet. If you edit the column, I expect that you’ll find that it is a “Text” column type.
What I would suggest is renaming that column to “UserID” or “BusinessOwnerID”, and then add a “proper” RowID column - ie. one that is a RowID type.
These Row ID will be different, no? I need for them to be the same as there are instances in the app the Row ID in the public sheet and private sheet are being compared to pull data.
You can pull the data using that column you brought over, that’s not a problem. The favorites can be tied to a whole new rowID column that is the true rowID of that specific sheet.
Just be aware that when you start using formulas that pull data from other sheets, the number and order of rows can fluctuate without Glide’s knowledge, and the true Row ID column WILL eventually become out of sync from the data that is being pulled in via a formula. You may favorite one business today, then delete a different business from the source sheet, which reorders the data in the copied sheet. All of a sudden your favorite on one business is now on a different business, because in Glide’s eyes, the true row id used for favorites didn’t change, but the associated business for that true row id changed in the copied sheet.
In situations like this, I recommend using scripts to fill the second sheet, but only let the script copy over the data without ever altering the order of existing rows in the second sheet. It would have to check for existing businesses ID’s and Add, Update, Delete as necessary. Don’t ever do a straight carbon copy of the data and let a business potentially get detached from the true Row ID it was assigned by glide in the second sheet. It will look good now, but will absolutely break later and you’ll spend too much time trying to figure out why.
Also, would this break my app since I am changing the data and headers?
Last time, I had to change this sheet from lookups to excel arrays as I have now and it cleared all my components. I had rebuild my entire app. Thanks!