AnsweredAssumed Answered

How do I use the 'Build Power Filter' option in a SOAP VBA call?

Question asked by RichardJ on Sep 12, 2017
Latest reply on Sep 13, 2017 by RichardJ

Hi,

I've got a SOAP query which calls data from our Clarity instance but I need to modify the query to include a Power Filter string to return data only for specific items which fall between a range of dates.

I can build the power filter to look like this:  nsql.ag_base_dt == dateMacro("ThisWeek") which gives me the items for This Week but I need to have that in a SOAP call.

 

My SOAP call, currently, looks like this:

'SOAP message.
soapstr = "<soapenv:Envelope xmlns:soapenv=" & Chr(34) & "http://schemas.xmlsoap.org/soap/envelope/" & Chr(34)
soapstr = soapstr & " xmlns:quer=" & Chr(34) & "http://www.niku.com/xog/Query" & Chr(34) & ">"
soapstr = soapstr & "<soapenv:Header>"
soapstr = soapstr & "<quer:Auth>"
soapstr = soapstr & "<quer:SessionID>" & SessionId & "</quer:SessionID>"
soapstr = soapstr & "</quer:Auth>"
soapstr = soapstr & "</soapenv:Header>"
soapstr = soapstr & "<soapenv:Body>"
    
soapstr = soapstr & "<Query xmlns=" & Chr(34) & "http://www.niku.com/xog/Query" & Chr(34) & ">"
soapstr = soapstr & "<Code>e3_ws_ppr_ms_q</Code>"
soapstr = soapstr & "<Filter>"
soapstr = soapstr & "<param_ppr_id>" & current_ppr_id & "</param_ppr_id>"
soapstr = soapstr & "</Filter>"
soapstr = soapstr & "<Sort>"
soapstr = soapstr & "<Column>"
soapstr = soapstr & "<Name>agreeddate</Name>"
soapstr = soapstr & "<Direction>asc</Direction>"
soapstr = soapstr & "</Column>"
soapstr = soapstr & "</Sort>"
soapstr = soapstr & "</Query>"
  
soapstr = soapstr & "</soapenv:Body> "
soapstr = soapstr & "</soapenv:Envelope> "

 

Any help as to how I can include the Power Filter criteria would be greatly appreciated :-)

 

Thanks

Outcomes