cancel
Showing results for 
Search instead for 
Did you mean: 

DataSource - Sorting & Reading

Contributor

DataSource - Sorting & Reading

Can you sort the datasource and How?

Can you read all rows in at once and How?

I need to read all of the following into my next call to alter their values:

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.ExternalPort 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.InternalClient 0.0.0.0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.InternalPort 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingDescription
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingEnabled 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingLeaseDuration 300
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingProtocol TCP
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.RemoteHost
2 REPLIES 2
Super Contributor

Re: DataSource - Sorting & Reading

Hi,

If it's a JDBC datasource you can sort the result using "order by" in your sql, otherwise there is no further way to sort the returned rows.

Regarding the reading of all rows, you would need to create a groovy script that
1) manually increase the datasource by calling its .next(..) method
2) writes each rows value from the datasource to  a temporary property

then use those properties in your request via property-expansion..

does that make sense?

regards!

/Ole
eviware.com
Contributor

Re: DataSource - Sorting & Reading

Yes, this makes a great deal of sense..

Thanks..
Terry
New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win