Forum Discussion

KellyBianchi's avatar
KellyBianchi
Qrew Assistant Captain
7 years ago

How would I apply placeholders to a query string from a 3rd party app?

I have been able to do this using the URL strings to add a record, but it doesn't seem to work for the query URL format. In the example below, I would want 'Ragnar Lodbrok' to use the placeholder {user:name}. Can that be done?

https://<em alt="" title="" name="" value="" type="" target="" rel="">target_domain</em>/db/<em alt="" title="" name="" value="" type="" target="" rel="">target_dbid</em>?a=API_DoQuery&includeRids=1 
&ticket=<em alt="" title="" name="" value="" type="" target="" rel="">auth_ticket</em>&apptoken=<em alt="" title="" name="" value="" type="" target="" rel="">app_token</em>&udata=mydata 
&query={'5'.CT.'Ragnar Lodbrok'}AND{'5'.CT.'Acquisitions'}&clist=5.6.7.22.3 
&slist=3&options=num-4.nosort.skp-10.onlynew&fmt=structured
  • You posted a URL that is difficult to read because it contains HTML markup. With the markup removed and the URL unrolled for display purposes it looks like this:
    https://target_domain/db/target_dbid
    ?a=API_DoQuery
    &includeRids=1 
    &ticket=auth_ticket
    &apptoken=app_token
    &udata=mydata 
    &query={'5'.CT.'Ragnar Lodbrok'}AND{'5'.CT.'Acquisitions'}
    &clist=5.6.7.22.3 
    &slist=3
    &options=num-4.nosort.skp-10.onlynew
    &fmt=structured
    You reference to a placeholder {user:name} suggests that you want to take this URL with specific parameters and convert it to some type of template where the placeholder token should be replaced with specific data supplied by a third party application.

    It is difficult to understand the context without know the third party application, the substitution mechanism involved or other details. Also your statement "I have been able to do this using the URL strings to add a record" suggest you have a working version but don't supply any details.

    Please clarify and supply details.
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    Correct - I am looking to pull data from a 3rd party. The difference between the query string, and the url string that works with placeholders are the curly brackets. I'm just wondering if there is something that has to be done to work around the curly brackets. I have tried double quotes, single quotes, no quotes... it just does not seem to read the information.

    • KellyBianchi's avatar
      KellyBianchi
      Qrew Assistant Captain
      I have resolved this by setting the report to open in a new window.