113
Views
15
Comments
Solved
Going back to first card when all cards are finished in stacked card list
Question

Hi,

Im using stacked cards for a mobile application. I want that when the last card is shown , automatically it goes back to the first card of the Stacked list. How can I do this?


Cheers,

Rank: #4858
Solution

Hi ,

Well,for information and for others  who might have this issue. I used OnItemChange instead of OnSwipeLeft and it solved my problem. My list is showing the first card.

Cheers :)

 hafsa zaineb wrote:

Hi Renato,

Yes you were right.I didn't use condition there. I changed it. i was getting an error while testing it on my phone. Its gone now :) and Im excited about it But the 1st card still wont show up. After all the cards are shown I get a blank screen instead of it going back to first card :(


hafsa 

Renato Torres wrote:

Hi Hafsa,


You have typed the condition on the If label property instead of the If condition property (that is always set to True).


You need to fix this.



Cheers,

Renato


hafsa zaineb wrote:

Hi Renato,

Thanks for the oml but I aint using any database for that. Attached is my oml. could you please have a look at it and tell me what is it that im missing.

Cheers,

Renato Torres wrote:

Hafsa,


Please find my OML attached to see if it can help you.


Cheers,

Renato


hafsa zaineb wrote:

Renato Torres wrote:

hafsa zaineb wrote:

i meant it is on the main screen.not here.



neb wrote:

Hi Renato, 

Thanks for the reply. How can I get UpdateStackedCards symbol ? Sorry im new to outsystems.:)

Cheers



It's in the logic tab:



Thank you /











Rank: #232

hafsa zaineb wrote:

Hi,

Im using stacked cards for a mobile application. I want that when the last card is shown , automatically it goes back to the first card of the Stacked list. How can I do this?


Cheers,


Hi Hafsa,

You can achieve it using the UpdateStackedCards action on the LeftSwipe and RightSwipe event handlers:



Cheers,

Renato


Rank: #4858

Hi Renato, 

Thanks for the reply. How can I get UpdateStackedCards symbol ? Sorry im new to outsystems.:)

Cheers

Rank: #0

I just tried this and it works... thanks Renato.

Hafsa... did you change the "if" statement to reflect your List?  E.g. my if statement is...

SyntaxEditor Code Snippet

CurrentPosition = GetTblPapRoomsImages.List.Length - 1

My List (Aggregate) is GetTblPapRoomsImages.