Xavier U
Posts: 0
Joined: Tue Oct 14, 2014 3:53 pm

How to stop duplicates when invoking a list service?

I had created a "favorites" page of sorts. Users will click the favorite button to invoke a "create service" to add a prayer id to a "list service."
Image

The "list service" is then loaded onto the "favorites" page.
Image

The only issue I am having with the functioning of the "create service" is that the favorite button can be clicked to add the prayer to the favorites page multiple times.
Image

How can I ensure that the "favorites" page will not have duplicate prayers?

Here is a public link to my test app: http://appery.io/app/mobile-frame?src...

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How to stop duplicates when invoking a list service?

Hello,

You can add check whether there is such record, if no - then invoke service with JavaScript:

preserviceInstanceName.execute({});/pre

where serviceInstanceName - service name

Return to “Issues”