HowTo: Using external services in a Smart Device AppUnofficial Content

As Smart Devices Apps are increasing in popularity lots of companies and developers are trying to do their Smart Device branch of their system. So if the Smart Device App is going to be a part of a whole system it should integrate with it.
The way that the SD app can integrate to the main application is by a Service Layer.
Take into consideration that this service layer  can or cannot be done with GeneXus.

So there is the need to be able to consume external web service without loosing the main features of the Work With Devices pattern such as:
Filters, Search, Paging, Orders and Break by.

Before you continue reading you should be familiar with these features.

In every Smart Device Grid of a Work With Devices pattern, GeneXus automatically generates a service that supports the above features mentioned.
So the solution is to be able to interact with third party services (non generated by genexus or generated by genexus but with no control from the SD app KB).
This is done by letting the developer interact with the interface that GeneXus Service are generated with.

The parameters managed by this automatic service are:

&SearchText  VarChar(1000)  the Text to the search
&SearchField Numeric(10.0)  Field by we are doing the search. If 0 means all if not is the number of the att defined on the conditions tab.
&start       Numeric(10.0)  States from which record the answer will bring data.
&count       Numeric(10.0)  Indicates how many registers have to be brought. 0 means all.
&OrderedBy   Numeric(10.0)  Indicates which order is going to be used. Base 1.
For Advanced Filters:
     - Standard: the name will be "C" + <NombreDeVariable>
     - Range: "C" + <VariableName> + "From" and "C"+ <VariableName> + "To"


In this document it is going to be detailed two examples which will cover all the features exposed.

Two paths are available to develop the examples:

1. Programming the logic in the SDObject. Precisely in the Load Event.

2. Using a procedure to manage the parameters and do the mapping between our SD Grid and our external Services.

1. Programming the Load Event

HowTo: External Services (Scenario1)

2. Using a procedure

HowTo: External Services (Scenario2)