Going back to first card when all cards are finished in stacked card list

Going back to first card when all cards are finished in stacked card list

  

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,

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


Hi Renato, 

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

Cheers

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



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:


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:



hi,

thank you for thereply. It gives me a js error on mobile which says 'cannot red property 'querrySelector' of null.' What does that mean? and what should I do now?

Cheers

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.


Davidk wrote:

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.



UMMM no David. i didn't and I don't know what a LIST aggregate is. Im new and this is my second app in outsystems but im using stacked cards for the first time :( Attached is a print screen of how my list goes.

Cheers

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 /

hafsa zaineb wrote:

Davidk wrote:

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.



UMMM no David. i didn't and I don't know what a LIST aggregate is. Im new and this is my second app in outsystems but im using stacked cards for the first time :( Attached is a print screen of how my list goes.

Cheers

I'm fairly new to OS as well... but it looks like you've got a Carousel Block inside your StackedCards Block.

I'm using a SQL Table (an Entity) as my data source.  When you drag an Entity onto a screen, it creates an Aggregate (kind of a Query)... and that data is represented in a List.

I don't think you're using a data source for your Stacked Cards... but using static content... is that right?

Could you save your app to disk (it will save as an OML) and then post it here?


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 /



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 /





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 /







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 /









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 /











Solution

Nice! 


hafsa zaineb wrote:

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 /