Not the same when publish

Hello,

I’m trying to create a Glide app that lets people vote during a festival.
I seem to have created everything just right, but the result when I publish the app is not the same as the one I have in Layout.

Where did I go wrong?

Here’s the support link https://go.glideapps.com/support/18216346-374e-4c52-bb32-43fa5be27363

Thanks a lot for your help !!!

Can you explain what’s different?

What I have on the Layout (and what I want)

And what I have when I follow the QR code (or the link in this case) : I can’t vote and I have access to Edit)

Do you have any visibility conditions on the button? What action does the button perform? Does your app require users to sign in?

Visibility : yes, “show tab when a field on the previous tab is filled”
The button “Vote” increments by 1 the Vote column
No sign in

I was wondering about the Vote Button. Not the tab.

Ah ok, sorry (I’m french, don’t speak fluently english…)
No, no visibility condition on the button Vote

Do you have manual publishing enabled?

Can you show what the Vote column looks like in the Votes table?

Can you also show how the Increment action is configured?

Automatic publishing

You have three buttons on your collection.

When there is not enough space for all of the buttons, they will be moved to the three dot sub menu.

If you want all three actions to happen with the same button, you should be using a Workflow. That way one button can run multiple actions within the workflow.

3 Likes

OK, thanks !
I’ll try it tomorrow…

2 Likes

Hello,

I made a workflow like you told me.
It’s cleaner…
And it works!!! (there was another problem too, that the Submit button on the first page wasn’t sending to the right place…).

However, in my Workflow I added an action, and I must not have configured it properly, it doesn’t work.
I’d like it to add the Name entered on page 1 in a column opposite the vote.
Here’s what I’ve done :

I’m a bit confused, can you describe exactly what you want to happen?

OK, I try..
On the first page, visitors must enter Name & Mail. On the second page, they vote for 1 image. When one vote, the number of this image increase of 1.
I’d like the name of the person who just voted to appear in a column in front of the image they voted for.
I hope that’s clearer…

What should happen when the next person votes for that image?
Should there then be two names, or should the second name replace the first?

the two names…
Is it possible ?

or maybe it’s easier to reverse? Have the name of the image voted for appear in the table opposite the name of the voter?

Most things are possible. It just depends what your end goal is, and what you plan to do with the information.

Why are you collecting the names of the people that vote?
Is it because…

  • You want to know all the people that voted for an image?
  • All the images that each person voted for?
  • The last person that voted for an image?
  • All of the above?
  • Something else?

For the sake of example, lets just assume you want to collect the names of everyone that votes, and which images they voted for. I think this would be a good use case for the Multiple Texts column. You could add one of those to your Images table, and use it to store an array of all the users that voted for each image. But rather than storing names, I would recommend storing UserIDs (RowIDs). Names can change, and when they do, things can break. But UserIDs will never change, so it’s better to use those for these types of things.

So, to set this up…

  • Start by adding a RowID column to your Users table. This will be your UserID.
  • In your Photos table, add two columns:
    – A Multiple Texts column. This is where you will store the UserIDs as people vote.
    – A Make Array column. You will use this one to add a Users UserID to the array when they vote. It should be an array constructed using two values: 1) The Multiple Texts column, and 2) The signed in Users UserID (RowID) from their User Profile row.
  • When a user votes for a photo, use a Set Column Values action that takes the value of the Make Array column and writes it into the Multiple Texts column.

If you take the above approach, you no longer need to use the counter or the increment action. Instead, to get a count of votes for each photo, simply use a Rollup column that targets the Multiple Texts column and does a count.

To get a list of users that voted for each photo:

  • Add a relation column in your Photos table that matches the Multiple Texts column with the UserID column in your Users table, and select “Match Multiple”
  • You can then either use that column as the source of a collection, or alternatively use a Joined List column that targets that relation and fetches a list of names.
2 Likes

Thanks for the detailed answer!!!

To answer your first question: it’s a vote for the most beautiful illustration during a festival.
So I need this vote to be very easy and quick.
And I’d also like voters not to have to create an account (especially as each visitor will be allowed to vote once, and there are lots of families coming to the festival…).
The most beautiful illustration wins, but also one of the people who voted for this illustration is drawn and wins the game… That’s why I need to know who votes for which image.

I’m trying to understand and test everything you’ve explained, and I’ll keep you posted!!!

Considering that’s it’s a festival, I would assume that multiple people would be voting at the same time. In that case, maybe the multiple texts approach is not be the best because you risk people overwriting each other. I think it would be better to write the image ID to a user row instead. Each user would update their own row instead of multiple users trying to update a single row at the same time.

2 Likes

This part will be a challenge. Because if users are not signing into your App, then you have no way of tracking who has voted and who hasn’t. You could do something to prevent a user voting twice within the same session, but users could circumvent that simply by reloading the App. Which in effect means that users could vote as many times as they like, and you would have no way of knowing that.

Jeff also makes a good point about concurrency. That was in the back of my mind as I was typing out my previous reply, but I didn’t mention it as I wasn’t aware of your real world use case.

4 Likes