Default values for data service when parameters are not passed

Hello,

I've created a new data service that uses the SunSystems ledger lines endpoint to extract transactions.

The data service has parameters for business unit, ledger and account code, these have been set as not required.

A simple OS App has been created that uses this data service to display the data in a grid.

A new context message has been created based on the SunSystems supplier context with parameters that match the data service.  This has been linked to the OS App.

The new App has then been added to the context panel and add a rule so that it only appears when in the Supplier setup screen is active.  It seems to only work when a supplier is selected but runs for all suppliers (account codes) when a supplier is not selected.

Does anyone know of a way to set default values in my data service so that if a parameter is not passed in the context it doesn't display all run for all account codes?

Any help appreciated.

Thanks

Alex

Parents
  • Thanks for the reply Caitlin,
    When I test the API in the gateway the account code is a query parameter so if it is left blank, it is not added in the request URL so all account codes are returned.  This is the behaviour I'm seeing in SunSystems because if the account code is not passed in the context, it is returning all values.  What I need it to do really is pass a default value if the context does not populate it.

  • This actually could be a good enhancement. Are you saying that you would like the ability to define a default value at the context message level that could be used if the context message came back null? For example, add a column to this screen for default value, that can be used if the message comes back null?

Reply
  • This actually could be a good enhancement. Are you saying that you would like the ability to define a default value at the context message level that could be used if the context message came back null? For example, add a column to this screen for default value, that can be used if the message comes back null?

Children