Using 2 URL Params to filter

Hello,
I am trying to get my dataset to filter by 2 URL Params.
Here is my code:
var params = Spry.Utils.getLocationParamsAsObject();
var dsDocumentsByType = new
Spry.Data.XMLDataSet("../data/Documentation/Q-DocumentList.asp",
"/root/row");
if (params.DocumentType) and (params.Facility_ID){
dsDocumentsByType.setXPath("/root/row[DocumentType =
'"+params.DocumentType+"' and Facility_ID=
'"+params.Facility_ID+"']");
dsDocumentsByType.loadData();
Any ideas what I did wrong?

Try using:
if ((params.DocumentType) && (params.Facility_ID))
That worked for me...
Don

Similar Messages

  • Sort Using URL Params?

    I've seen websites that change the sorting order of a repeating region based on a URL parameter (ex. thispage.php?sort=state). I cannot for the life of me figure out how to do this with ADDT. Do you use multiple recordsets per page, each of which filter by a different URL variable? Or is it simply not possible with ADDT?

    Hi Brian,
    I've seen websites that change the sorting order of a repeating region based on a URL parameter (ex. thispage.php?sort=state). I cannot for the life of me figure out how to do this with ADDT
    You´ll basically need to turn the recordset´s static ORDER BY statement into a dynamic one, means something like:
    "SELECT * FROM tablename WHERE... ORDER BY ".$_GET['sort'].""
    This is of course a very basic example which assumes *that* thispage.php will always be referenced from e.g. another page that´s passing the URL parameter "sort" -- but in case thispage.php is supposed to additionally get loaded in a sort of stand-alone mode, you´ll need to implement a much more advanced PHP logic by basically defining an if/else condition which checks if the URL parameter "sort" is set or not, and turning the whole "ORDER BY whatever_condition" statement into a dynamic PHP component.
    Or is it simply not possible with ADDT?
    It requires manual PHP coding, and such a modified recordset will usually no longer be visible in DW´s server behaviours list
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Set XML file using URL Param

    Hi Guys,
    well I got talked into writing a quick html application using Spry as I had once done this before.
    However, this time I'm using multiple XML files as a datasource and can't seem to get the code right. It's probably really easy for all you guru's out there, but I'm more a designer than programmer so I was hoping someone could have a quick look:
    Im using Spry.Utils.getLocationParamsAsObject and used the following code to identify the right node in the XML file to show you the record as declared in the URL:
    var xpath = "Cocktails/cocktail";
    if ((params.id))
      xpath = "Cocktails/cocktail[@id = '"+params.id+"']";
    However, this was done using one large XML file with all the records.
    This time I have one XML file per record and need to identify the correct file. The file is named using the following convention 'cocktail%ID_HERE%.xml' so this time I need to to get the ID value from the URL and use it to lookup the right XML file. I wrote the following code having 'reverse engineered' this from my last project, but obviously it doesn't work:
    var rsCocktail = new Spry.Data.XMLDataSet("xml/cocktail.xml", "Cocktail");
    If ((params.id))
              rsCocktail = new Spry.Data.XMLDataSet("xml/cocktail"+params.id+".xml", "Cocktail");
    I'm assumig the idea is correct, the code is just wrong as I can't insert the variable in the filename like that. Anyone willing to shine some light on this?
    Much appreciated!!!

    This is what the head section should look like
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet">
    <script src="SpryAssets/xpath.js"></script>
    <script src="SpryAssets/SpryData.js"></script>
    <script src="SpryAssets/SpryURLUtils.js"></script>
    <script>
    var params = Spry.Utils.getLocationParamsAsObject();
    var rsCocktail = new Spry.Data.XMLDataSet(params.id ? "xml/cocktail"+params.id+".xml" : "xml/cocktail.xml", "Cocktail");
    </script>
    </head>
    <body>
    </body>
    </html>

  • Using 3 url params

    Hi all,
    I need to filter my data using 3 url params my code is
    I am using the xpath, I am not getting any error however the
    image doesn't come on the page
    var dsImage = new Spry.Data.XMLDataSet("events.xml",
    "events/");
    var params = Spry.Utils.getLocationParamsAsObject();
    if
    ((params.year)&&(params.event)&&(params.image)){
    dsImage.setXPath("year[id = '"+params.year+"'] &&
    year/event[id = '"+params.event+"'] &&
    year/event/images/image[id = '"+params.image+"']");
    dsImage.loadData();
    Any ideas would be really appreciated

    Ok guys,
    I used this piece of code instead and works fine
    var xpath = "/events/";
    var params = Spry.Utils.getLocationParamsAsObject();
    if
    ((params.year)&&(params.event)&&(params.image)){
    xpath = "/events/year[@id = '"+params.year+"']" &&
    "/events/year/event[@id = '"+params.event+"']" &&
    "/events/year/event/images/image[@id = '"+params.image+"']";
    var dsImage = new Spry.Data.XMLDataSet("events.xml",
    xpath);

  • Can we use xsl:param element in XSLT mapping...?

    Hi Guys
    Can we use <xsl:param> element in XSLT mapping in XI..?
    Is there any documentation out there for XSLT mapping?
    Thanking in advance

    Hi,
    Check this link for an example:
    https://www.sdn.sap.com/sdn/url.sdn?res=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/6c514a4f-0501-0010-038c-994da5200215
    Regards,
    Sridhar

  • URL Param is not working

    Hi,
    I am passing two variable values through URL for one template to another template. It was passing two variable values to second templates but suddenly after applying new java patch it is not passing the second variable value in the URL.  Is there any other way i can achieve this with out SET_VARIABLES_STATE command.
    URL Params:
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0P_CALYE
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING
    &BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=2008
    &BI_COMMAND_2-BI_COMMAND_TYPE=SET_VARIABLES_STATE
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=Z_RGN
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING
    &BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=EAST
    Any help is appreciated?
    Thanks in Advance,
    Damodhar.

    I think i can set characteristic value directly using URL command instead of setting variable value.Can anyone provide me the <b>URL parameter</b> for the following command.
    <bi:SET_SELECTION_STATE >
                     <bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" >
                            <bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_1" />
                                        </bi:TARGET_DATA_PROVIDER_REF_LIST>
                       <bi:CHARACTERISTICS_SELECTIONS type="UNORDEREDLIST" >
                <bi:CHARACTERISTIC_SELECTIONS type="COMPOSITE" index="1" >
                                                <bi:CHARACTERISTIC value="CHAR1" text="" />
                                                <bi:SELECTIONS type="ORDEREDLIST"<bi:SELECTION type="CHOICE" index="1" value="SELECTION_INPUT_STRING" >
                            <bi:SELECTION_INPUT_STRING value="INPUT1" />
                                                    </bi:SELECTION>
                                                </bi:SELECTIONS>
                                            </bi:CHARACTERISTIC_SELECTIONS>
                                        </bi:CHARACTERISTICS_SELECTIONS>
                                    </bi:SET_SELECTION_STATE>
                                    <bi:SET_VARIABLES_STATE >
    Thanks,
    Damodar.

  • Cannot get URL web part filter to pass Parameter to List web part

    How do I wire an out-of-the-box URL web part filter to a SharePoint 2013 list (or "app" as renamed in 2013) web part when the list has a parameter?
    My SharePoint list uses a parameter because it needs a Contains filter, as in
         <Where>
          <Contains>
           <FieldRef Name="MyFieldName"/>
           <Value Type="Note">{MyParam}</Value>
          </Contains>
         </Where>
    The ParameterBinding is defined simply.
    <ParameterBinding Name="CohortParam" DefaultValue=""/>
    It has had Location="None" in the past, but another forum entry that I read suggested removing that.
    When I add the list (or "app" in SharePoint 2013) to a web part page and also add a URL Filter web part, the URL filter cannot see the parameter. The menu chain Connection >> Send Filter Values To >> [My List web part name] shows
    the dialogue. On the "Choose Connection" tab, I choose "Get Parameter Values From". Clicking the "Configure" button results in the "Configure Connection" tab having the message "The Consumer Web Part did not
    provide schema information".

    Hi Randy,
    You need to change the "MyParam" to "CohortParam", for parameterbinding element we need to add the location attribute as below codeline, then when we use the QueryString "CohortParam" with value in url, it will directly
    filter the list web part items without adding URL Filter web part.
    <ParameterBinding Name="CohortParam" Location="QueryString(CohortParam)" DefaultValue=""/>
    I attached my resutls as below image (also "MyParam" can be changed to "CohortParam" if you want), you can take a look.
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • Sort by URL Param

    Not sure how to make this work but have read labs information
    and samples for sorting and url params just not sure how to tie
    them together to make this work. I have a link to the page I want
    to add this to if someone can take a look it is
    test site. When
    the user uses a link I need to have data sort by the name value
    from the xml file placing the correct contet at the top. Not sure
    if I'm headed in the right direction so any help would be
    appreciated.

    You would want to do soemthing like:
    var dsNews = new Spry.Data.XMLDataSet("news6.xml",
    "news/newstory");
    dsNews.sort(yourURLParam, "ascending");
    var pvNews = new Spry.Data.PagedView( dsNews ,{ pageSize: 4
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset.html#sort

  • How to use wildcards in REST filter for subscription items

    I am following this documentation:
    String column filters
    Support % (starts with) operator.
    Support * (Contains) operator.
    Does not support (ends with) operator.
    Examples:
    Name=service*
    Name=*g*
    Name=*g -- not allowed
    REST URL:
    http://<ServerURL>/RequestCenter/nsapi/serviceitems/serviceitemsubscription/<columnName>=<wildcardValue>
    I can get filters to work without wildcards, but have had no success using '*' or '%' characters.  Please provide a properly encoded sample URL for
    ServiceItemTypeName starting with 'Virtual'.  I have not been able to get any data returned when using wildcards in a filter.
    Here is what I have tried:
    ServiceItemTypeName=Virtual Server Snapshot
    http://10.8.0.46:8080/RequestCenter/nsapi/serviceitems/serviceitemsubscription/ServiceItemTypeName=Virtual%20Server%20Snapshot
    response: 200
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><AllServiceItems totalCount="1" recordSize="1" startRow="1">
    literal works as expected
    ServiceItemTypeName=Virtual%
    http://10.8.0.46:8080/RequestCenter/nsapi/serviceitems/serviceitemsubscription/ServiceItemTypeName=Virtual%25
    Application-Type=application/xml
    response: 200
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><AllServiceItems totalCount="0" recordSize="0" startRow="1"/>
    expected result not returned
    ServiceItemTypeName=Virtual*
    http://10.8.0.46:8080/RequestCenter/nsapi/serviceitems/serviceitemsubscription/ServiceItemTypeName=Virtual*
    Application-Type=application/xml
    500
    <nsapi-error-response>Internal Error: Invalid parameter values specified or unexpected error.</nsapi-error-response>
    fails with error response

    Hi Dan,
    I don't think you can use wild cards here.
    Please see the Integration Guide for 9.4. Section: "REST API -> Quick Reference".
    Here you'll find a table of what features are supported for the different resources exposed by the API. In there you will find a row for "All Service Items", and you'll see that: Get All, Sorting, Paging and All Filters are supported; Wildcards Name Search are not...
    When I came accross this same situation, I assumed that I am trying to do a Wildcard Name Search here... and it's not supported. It does, however, work for the other (SI Designer created) columns, which is what I believe the documentation is trying to describe. (Though, personally, I feel this is a bug).

  • Ignore URL  param in dispacther

    Hi,
    We have some page URLs that has some analytic params that needs to be capture from Omniture javascript. If we are having the param in URL the page is not cached as expected. So i  want to ignore the URL param in dispatcher and serve the content from cache and have the query params in the URL to be taken care by analytics code.
    As I read in http://dev.day.com/docs/en/cq/current/deploying/dispatcher/disp_config.html , i can use ignore url param in dispatcher.
    I applied those changes but it is not working for me.
    Some doc : http://helpx.adobe.com/adobe-cq/kb/troubleshooting-dispatcher-flushing-issues.html    
    Please advice.
    Thanks

    Hi Jorg/Scott,
    I am using dispatcher-apache2.2-4.1.0.so
    Entry in dispatcher.any- 
    /ignoreUrlParams
      /0001 { /glob "*" /type "deny" }
      /0002 { /glob "q" /type "allow" }
    Dispatcher log snippet-
    [Thu Dec 13 20:37:59 2012] [W] [24596(140205433005824)] /app/Apache2.2/conf/dispatcher.any:197: entry not recognized: 'ignoreUrlParams'
    [Thu Dec 13 20:37:59 2012] [W] [24596(140205433005824)] Render rend02 has no hostname; entry ignored
    [Thu Dec 13 20:37:59 2012] [I] [24596(140205433005824)] Dispatcher initialized (build 4.1.0)
    It seems entry is not recognized.

  • How to pass the JCo destinations as URL params?

    Hi,
    I have requirement to pass my JCo names as Url Params.
    jcoParam = "WD_ORD_RFC_METADATA_DEST:MNR "+" WD_ORD_MODELDATA_DEST:MNR";
    how do I combine and sent to URL params
    urlParameters.put("sap-wd-arfc-useSys",jcoParam);
    I am passing like this but the URL will take one parameter
    with one name but I need to pass the same parameter with diffrent Jco destination how to solve this please guide in this.
    I need like this But
    Url will take one parameter with sap-wd-arfc-useSys this name only the parameter sap-wd-arfc-useSys name is not taking once again .
    sap-wd-arfc-useSys=WD_ORD_RFC_METADATA_DEST:MNR
    & sap-wd-arfc-useSys=WD_ORD_MODELDATA_DEST:MNR
    Any body suggest on this.
    Thanks,
    Lohi.

    Hi Lohita,
    The parameter sap-wd-arfc-useSys should be given in the iview properties in the Content Administrator. The portal will be able to read the parameters properly even when you repeat the parameters like
    sap-wd-arfc-usesys = WD_ORD_RFC_METADATA_DEST:MNR & sap-wd-arfc-usesys = WD_ORD_MODELDATA_DEST:MNR in the iview properties.
    You will not abe able to pass it from the application as we would be using HashMap to pass the url parameters.As far as i know there is no other parameter available for the same purpose. Try giving the same in the iview of that applicaiton, it will work.
    Regards,
    Sharadha

  • Using URL Parameters  to Control Data Regions - HTML Data set.

    Hello folks,
    I creating a website for company and I am using HTML data set for siderbar navigation and content. It works beautifully and content updates as it have to without page refreshing. But I need to have an unique url for each sidebar element, so I i found  this nice sample http://labs.adobe.com/technologies/spry/samples/data_region/DataWithURLParams.html?row=20.  I did analogy with that sample on my website and indeed all sidebar elements now have unique url - but here comes new problem. Now  when I click on the each sidebar element - page starts to refresh . Here is my website http://www.varpa.eu . What have i done wrong ? How can I get  it to load new content without refreshing the page and to have each sidebar element unique url ? Please mention that I am talking only about the sidebar , not the topbar. Please help me .
    Sorry for my bad english , it aint my native language.
    Thank you,
    Richard.

    Thank you for your response Ben.
    That code which you provided is the top bar code. The top bar buttons should refresh the page, because I haven't done a spry magic with them yet.
    I was talking about the sidebar where Company , History etc.  elements are standing. Sidebar code is:
    <div id="sidebarbuttonwrapper" spry:region="about_us" >
    <div spry:repeatchildren="about_us" spry:choose="choose" >
    <div  id="sidebarbutton"
    onclick="location.href='about.html?row={ds_RowID}';"
    spry:when="{ds_CurrentRowID} == {ds_RowID}" spry:setrow="about_us"  spry:selected="sidebarbuttonselected" spry:select="sidebarbuttonselected" spry:hover="sidebarbuttonhover">{button_name}</div>
    <div  id="sidebarbutton"
    onclick="location.href='about.html?row={ds_RowID}';" spry:default="spry:default"  spry:setrow="about_us" spry:hover="sidebarbuttonhover" spry:select="sidebarbuttonselected">
    {button_name}
    </div>
    </div> 
    </div>
    As you can see here http://www.varpa.eu/test/about.html?row=0 when I click on the sidebar elements page doesn't refresh , but the each sidebar element doesn't have unique URL.
    When I included the URL params as in that sample above, now in this case http://www.varpa.eu/about.html?row=0 each element have unique URL, but this URL change makes page to refresh.
    Any suggestion how to achieve that each sidebar element would have unique URL, and clicking on it would not cause page to refresh ?
    Richard.

  • External list - filtering using URL

    Hi All,
    How can I apply filter using URL for external list? I know it works for SP native list.
    Thanks :)

    Thanks for your link. But it just works for "equal" value. How could I do for "contains" value.

  • Filtering using URL in NW04s

    Dear Sirs,
    my requirements are as follow. I have a query which I want to filter on a specific Business Partner (0bpartner). On top of the query I have a simple Webtemplate with Analysis item.
    How can I using URL filter 0BPARTNER preferly without a variable.
    best regards,
    Jørgen
    Found similar thread but does not reveal solution.
    Hi Sany, Yes, I did get this resolved. However, so you can award points, please open up another forum post, and I will gladly answer. You can simply cut/paste the URL from this post and ask the same question.
    Kind Regards,
    Alex
    PS. Looking for your new post.

    Hi Jørgen,
    SAP has moved to command sequences.  If you append this onto the end of your URL (where your url ends with ...?QUERY=xxxx), and you replace nnnnn (quotations not required) with the value you want in your 0BPARTNER, it should work:
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_2-CHARACTERISTIC=0BPARTNER&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_2-SELECTIONS-SELECTION_2-SELECTION_INPUT_STRING=nnnnn
    For your reference, here is the SAP help on this topic..
    http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/content.htm
    If this helps, please award point accordingly.
    Regards,
    Alex

  • Display template using URL

    Hi,
    Can we call a display template using by giving path in WebPages?
    Query template i tried and was working. Want to know whether it is possible with Display template also.
    Please help.
    Thanks in advance
    Muzammil P.T

    Ok,
    We can use Query Templates in Web pages rite, for example , <b>"http://localhost/Lighthammer/Illuminator?QueryTemplate=Samples/QueryTemplate/testQuery&Content-Type=text/xml"</b>If we are giving this URL in WebPage as a source, it will brings the desired output. The same output as what  we get while using <b>TEST button in Query Editor</b>. If we need to add some styles into it, we can either use XSL or Display Template into it. Using XSL will looks as follows
    <b>"http://localhost/Lighthammer/Illuminator?QueryTemplate=Samples/QueryTemplate/testQuery&Content-Type=text/xml&Param.1=%&StyleSheet=http://Localhost/LH/xsl/MyStyle.xsl"</b>
    Instead of XSL, is it possible to use display template ? If yes, How? 
    I understand that the same thing is possible using Applet tag. But i need to know whether is this possible using URL or not.
    Please help me out.
    Thanks in advance
    Muzammil P.T

Maybe you are looking for

  • What is the best way to completely uninstall Aperture from a MacBook Pro?

    What is the best way to completely uninstall Aperture from a MacBook Pro. I just ordered a new MacBook Pro and I want to remove it from my older MacBook Pro.

  • Bootcamp - Catalyst Control Center - help me!

    Hello, I've tried to install catalyst control center for windows 7 bootcamp, I can't seem to find the download for the actual program, I only find the drivers for it, I did find the program once, and installed it, but then I only had 2 different tabs

  • When i click save button the data get cleared

    Hi All, I am using oracle Apps r12 and forms 10g. I have a form when the user enters the data and click save option the data get cleared in the form and asked the user to enter to reenter the data again.Can any pls tell me the reason behind this.I ha

  • Shows no videos

    my ipod touch will not show any videos.  Puchased from iTunes, converted to iPod format, and it shows as being loaded during sync.  Twice the tv shows showed up but crashed the ipod.  Then when video is selected is says no videos.  Reload from iTunes

  • Stuck paper tray in photosmart C7280 all in one

    Okay, this is bizarre. The entire paper tray is stuck inside the unit. I can hold the printer upside down while holding the tray. That's how stuck. Is there any way to extract the thing without doing more damage?