Page 1 of 1

Changing datasource for service

Posted: Tue Oct 29, 2013 5:05 pm
by Scott Schechtel6280324

I created another data collection in my database and would like to know how to implement the new collection and remove the current collection without losing the app functionality.


Changing datasource for service

Posted: Tue Oct 29, 2013 5:09 pm
by maxkatz

Add a new service to the page, map it, and then remove the other service.


Changing datasource for service

Posted: Tue Oct 29, 2013 5:29 pm
by Scott Schechtel6280324

i am just afraid everything will be lost when I see this message before deleting the old datasource service. Also it is now named restservice 3 instead of 2:

Selected component has dependent content:
Event: Load; owner: Results; action: Invoke service

Event: Page show; owner: Results; action: Invoke service

Do you really want to remove it with all dependent data?


Changing datasource for service

Posted: Tue Oct 29, 2013 5:33 pm
by maxkatz

The service is invoked on two events: page load and page show. If you remove the service from the page, those events will also be deleted (as there is no service to invoke now).


Changing datasource for service

Posted: Tue Oct 29, 2013 5:40 pm
by Scott Schechtel6280324

Here is what I have so far. See screenshot:

Image


Changing datasource for service

Posted: Tue Oct 29, 2013 5:54 pm
by Scott Schechtel6280324

It works! Thanks,


Changing datasource for service

Posted: Tue Oct 29, 2013 6:00 pm
by Scott Schechtel6280324

...but now since the order is different that it was before, the no results component is not working, i.e. when I scan a barcode that is not in the db, nothing happens. I need the alert javascript popup indicating 'no products found...'


Changing datasource for service

Posted: Tue Oct 29, 2013 9:37 pm
by maxkatz

You can change action invocation order by clicking the up/down arrows.