I am trying to get distinct set of data from a document which is an input to a flow service. Ex.
orderNo orderType lineNo itemNo quantity price
1001 SO 1 I1 10 1000
1001 SO 2 I2 11 110
2011 SO 1 I1 10 1000
2011 SO 2 I2 21 210
2011 SO 3 I3 22 4400
3021 SO 1 I2 10 100
3021 SO 2 I3 10 2000
Using SQL : select distinct <orderno> from <table> where <ordertype=‘so’>
Is there any way to implement the above concept using a Document, used as an input, to a flow service?
There wouldn’t be any build in service to achieve what you desire.
I would suggest that you write a java svc and use webM IData/Values API to get the output.
Let us know if you need more details on how to implement such a java svc.
I would appreciate if you please help me to write the service
We can accomplish this using flowService logic,just created some sample flow and tested this.
See the attachment of Package “TestDistinct.zip” and install this in IS6.0 and above version.
Run the TestDistinct:makeDistinct service and pass the inputs to documentList (type=SO and num=1001)so on…as per you mentioned.The output “numlist” gives the only distinct values.
Thanks RMG. The reason I was suggesting java svc was because of performance considerations.
Ramendu, you got what you were looking for.
Thanks RMG for your help.