on 11-09-2016 1:49 PM
Hello Everyone
I am using XSDS to select data from a CDS table. I am using $aggregate function, in which I am trying to send a Column based on the input. I tried with few options and tried to get info online. Did some one worked on this? and have a handy solution on how to pass a column name dynamically to the aggregate function?
Thanks for sharing your responses.
regards
Giri
Giri,
agree with Florian, in your $aggregate function, you can pass an object like
// table.$query().$where(oYourConditions).$aggregate(oYourColumns).$execute();
the variable/object oYourColumns would be like { COLNAME: true, COLNAME2: true }; // replace COLNAME/COLNAME2 with your actual column name from the table. You may have one or more of these columns in the object you are passing into the aggregation clause.
here is the API documentation - I hope this helps. Let us know if you run into other issues and good luck!
my advise to make sure your code is running correctly would be to write a sql query on the sql console, then your xsds code to validate you did the correct XSDS syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.