Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to use the "In" operator in Calculated View Filter Expression

$
0
0

Hey Peter,

 

Thanks for coming back to me, really appreciate it.  Sure it took a bit of head scratching to take yourself back!

 

I removed the single quotes from the expression, so just to confirm, I now have:

 

in("FOODSTUFFID",$$P_FOODSTUFFID$$)

 

 

The following select works:

 

SELECT

  TOP 400 "FOODSTUFFID",

  "NUTRIENT",

  "NAME",

  "GROUPID",

  "SOURCE",

  "MEASURE_TYPE",

  "MEASURE_AMOUNT",

  "MEASURE_GRAMS",

  sum("NUTRIENT_VALUE") AS "NUTRIENT_VALUE"

FROM "_SYS_BIC"."mypath.models.calculation/Foodstuff" ('PLACEHOLDER' = ('$$P_FOODSTUFFID$$',

  '''1001'',''1003'''))

GROUP BY "FOODSTUFFID",

  "NUTRIENT",

  "NAME",

  "GROUPID",

  "SOURCE",

  "MEASURE_TYPE",

  "MEASURE_AMOUNT",

  "MEASURE_GRAMS"

 

 

 

But not the following oData:

 

foodstuff.xsodata/InputParams(P_FOODSTUFFID='''1001'',''1003''')/Results?$select=NUTRIENT

 

 

To clarify "not working", the call completes successfully (no error), but no results are returned, which makes me wonder how the oData call is being parsed.  If I create a calculated column CC_IP with value = input parameter (and of course remove the filter to get some results), propagate calculated column value to semantic output, expose CC_IP in service and place into the following url:

 

foodstuff.xsodata/InputParams(P_FOODSTUFFID='''1001'',''1003''')/Results?$select=NUTRIENT,CC_IP

 

 

 

I get the following as the input parameter value as the model sees it:

 

<d:CC_IPm:type="Edm.String">'1001','1003'</d:CC_IP>



I'm wondering about the single apostrophes, and whether that is throwing the IN expression i.e. no match and hence no results?


To add - this is on AWS Developer Edition, rev.91


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>