Forum Discussion
StevenColon
8 years agoSmartBear Alumni (Retired)
Thank you for posting to our Community Forum.
There seems to be a bit of confusion on how Datasources are implemented in ServiceV. It is meant to allow users to return a variety of responses but it merely iterates through each row of the grid. You cannot select any specific row.
Here is our documentation on this so that you can learn more: https://support.smartbear.com/readyapi/docs/servicev/configure/datasources.html
If you need specific data passed along depending on a request, You can do one of two things.
- Create a response for each possibility and use the script dispatching strategy to select the appropriate response depending on what is in the request. https://support.smartbear.com/readyapi/docs/servicev/configure/dispatch/script.html
- If you have alot of possibilities, then the best option is to implement a database and create a single response that uses a groovy script to query the DB. I cannot provide an example script since there are different DB providers but you shouldn't have an issue looking up how to write a script to connect to any DB provider.
Let me know if you have any questions/concerns.
Related Content
Recent Discussions
- 3 days ago