Paging and navigation using increment action

i just checked my app.
This works now! Excellent work guys - real quick turnaround! Keep it up!

2 Likes

Thanks you @Manan_Mehta really helpful!

1 Like

Thank you so much. :smile:

1 Like

To the people (including me) who didn’t understand how to create the UID as shown - it could be done like:
=ARRAYFORMULA(IF(A2:A<>"",Row(A2:A)-1,""))

3 Likes

This is very neat. But I have a problem as below:
I am linking a tile to a row. And, then I use the above technique to have a button for Previous and Next to move to the previous and next rows.

But, when I click the top left arrow for Back, and then I click the tile again, it shows the next row based on the counter value present, when I clicked the top left arrow for Black.

This becomes confusing because each tile is linked to a specific row, and because the user clicks the next or previous button, the counter changes, and therefore the row displayed changes and it is not the specific row which is displayed. My app is at lpflix.glideapp.io. Check with clicking Science and then clicking any of the images in Science. I have only configured for Science.

In your case, you have a navigation sheet separate from the listing sheet. But, I dont have that since I want a listing of all the rows as tiles and then navigating to each row.

Is there a way out of this problem? Thanks


I click the first image for the first row.

Then I click Next Video

Then I click Back on top left

Then I click the first image again. But, it shows a different row.

This is my sheet columns and values. I use the video from the relation column Playing Now which changes based on the counter value, and I put this video link in the Current Video. And, the counter value changes based on Increment operation in Next Video button or Previous Video button.

There is also a Video column which has the actual video for each row which is supposed to appear when the image is clicked at the beginning.

I believe the straightforward solution is to clear whatever incremental column you have for the navigation before a view details.

So first a set column, clear the value in the navigation column, then view details. Does it work?

I am able to set columns which resets the value of the Counter to the UID when I click the image from the first page. But, then how do I view the details? Because if I set the action on the image as Set column, I am not able to then view details. How would I do that?

Did it! Kisses and hugs to Glideapps team. I found the Create New Action feature which is just what I needed. Its amazing. I am so proud of Glideapps. Wow! This feature is really blowing my mind. I created a new action Set Columns followed by View Details, and Voila, the job is done! Awesome. Thanks @ThinhDinh for the help. :heart_eyes:

4 Likes

In my case I am using a details view and hence it’s not a big problem for me. Thankfully with compound actions you can now achieve this as @ThinhDinh mentioned.

2 Likes

Glad it helped :wink:

Is it possible to have the two buttons in a single line? For example, Next Video and Previous video on the same line instead of one above the other? Thanks

2 Likes

Are you willing to use CSS? Glide doesn’t officially support it so it can break down any time.

Yes, sure, no problem in using CSS. How do I do that?

<pre><span><style>
.fZlvaI {
width: 50%;
float: left;
}
[data-test="app-button-view"] {
margin: 10px;
}
.crVslF div:nth-child(1), .gTDCyN div:nth-child(1) {
display: block;
}
</style></span></pre>

Here’s what’s working in my side. Put this in a rich text component.

2 Likes

Thanks, I’ll check it out. I have another problem. How do I have the above happen separately for different users? I haven’t set up the User Profiles. Will that help? Still, it seems a daunting task to have separate views for each of hundreds and thousands of users, who may be viewing any one video and the counter values will keep changing for each. Any ideas?

1 Like

The counter should be a user-specific column so you won’t face that problem.

Hi Manan! Thanks for tutorial. I’m having some issues getting this to work.

Mainly, I’m struggling to figure out the architecture of your app to make this all work.

I’ve copied both the layouts for the Navigation Screen and All Bikes spreadsheets but I’m a bit stuck wrt how to tie it all together.

Here’s a link to a short zoom video detailing my problem. If any Glide Experts want to reach out, I’d gladly pay for an hour of your time for your help.

Here’s a link to my app: https://zippy-house-5586.glideapp.io/

Thanks!

Alex

3 Likes

@alexdw5
When setting up your increment action you could think about how it should look. For inspiration you can take a look here

Upload multiple images to Cloudinary

2 Likes

thank @Krivo! much appreciated, I’ve been trying to figure this out for 2-3 hours now lol. I’ll have a look :slight_smile:

I think your app is a bit over my head. Also, it might be broken when I try to copy it?

Like I said, over my head :slight_smile: I tried to add some image links from Google Drive to populate the app with some images but it did not work.

The screenshot is from the app’s ā€œImagesā€ sheet.

Any advice here is appreciated – thanks!

Alex

1 Like