Select nested WMS layers with specific SRS value using XQuery

A WMS getcapabilities document contains a nested list of Layers. I need to get a list of layers for which is true: - It is queryable and - It has an SRS value of EPSG:28992 or any of it's parent layers (or parents parents etc) has an SRS value of EPSG:28992.
I came up with this query which I'm not very happy with because it only allows for three nested Layers.
select t.*
        from xmltable(xmlnamespaces('http://www.w3.org/1999/xlink' as "xlink")
                      ,'for $d in /WMT_MS_Capabilities/Capability/Layer[SRS="EPSG:28992"]
                        where $d/@queryable="1"  return $d'
                      passing p_xml columns name varchar2(100) path 'Name'
                      ,title varchar2(100) path 'Title'
                      ,url varchar2(4000) path 'Style[1]/LegendURL/OnlineResource/@xlink:href'
                      ,style xmltype path 'Style') as t
      union all
            select t.*
                 from xmltable(xmlnamespaces('http://www.w3.org/1999/xlink' as "xlink")
                            ,'for $d in /WMT_MS_Capabilities/Capability/Layer/Layer
                              where $d/@queryable="1"
                                and (/WMT_MS_Capabilities/Capability/Layer/SRS="EPSG:28992"
                                     or /WMT_MS_Capabilities/Capability/Layer/Layer/SRS="EPSG:28992") return $d'
                            passing p_xml columns name varchar2(100) path 'Name'
                            ,title varchar2(100) path 'Title'
                            ,url varchar2(4000) path 'Style[1]/LegendURL/OnlineResource/@xlink:href'
                            ,style xmltype path 'Style') as t
      union all
               select t.*
                  from xmltable(xmlnamespaces('http://www.w3.org/1999/xlink' as "xlink")
                            ,'for $d in /WMT_MS_Capabilities/Capability/Layer/Layer/Layer
                              where $d/@queryable="1"
                                and (/WMT_MS_Capabilities/Capability/Layer/SRS="EPSG:28992"
                                     or /WMT_MS_Capabilities/Capability/Layer/Layer/SRS="EPSG:28992"
                                     or /WMT_MS_Capabilities/Capability/Layer/Layer/Layer/SRS="EPSG:28992") return $d'
                            passing p_xml columns name varchar2(100) path 'Name'
                            ,title varchar2(100) path 'Title'
                            ,url varchar2(4000) path 'Style[1]/LegendURL/OnlineResource/@xlink:href'
                            ,style xmltype path 'Style') as t;I'm wondering if there is a better approach using Oracle 10.2.05.

A couple of options (both quite slow unfortunately) :
XQuery recursive function :
select x.*
from tmp_xml t
   , xmltable(
       xmlnamespaces('http://www.w3.org/1999/xlink' as "xlink")
     , 'declare function local:getLayer($e as element(Layer)*) as element(Layer)*
          for $i in $e
          where $i/SRS = "EPSG:4269"
          return $e[@queryable="1"] | local:getLayer($i/Layer)
        local:getLayer( /WMT_MS_Capabilities/Capability/Layer[SRS="EPSG:4269"] )'
       passing t.object_value
       columns name  varchar2(100)  path 'Name'
             , title varchar2(100)  path 'Title'
             , url   varchar2(4000) path 'Style[1]/LegendURL/OnlineResource/@xlink:href'
             , style xmltype        path 'Style'
     ) x
Ancestor axis :
select x.*
from tmp_xml t
   , xmltable(
       xmlnamespaces('http://www.w3.org/1999/xlink' as "xlink")
     , 'for $i in /WMT_MS_Capabilities/Capability/descendant::Layer
        where $i/@queryable = "1"
        and exists($i/ancestor-or-self::Layer[SRS="EPSG:4269"])
        return $i'
       passing t.object_value
       columns name  varchar2(100)  path 'Name'
             , title varchar2(100)  path 'Title'
             , url   varchar2(4000) path 'Style[1]/LegendURL/OnlineResource/@xlink:href'
             , style xmltype        path 'Style'
     ) x
;Tested on a modified version of this document (stored in an XMLType table) :
http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en?VERSION=1.1.1&request=GetCapabilities&service=wms

Similar Messages

  • Selection screen list box with run time values

    Hi,
    I have to create a selection screen list box with with values at run time.
    This is actually for a maintanence view.
    Please help.
    Thanks
    Vimalraj

    Have a search in SDN and elsewhere for the function module 'VRM_SET_VALUES'... for example there's one at:
    Re: Listbox with Function code in Table control
    wherein the 2nd listbox contents are driven from the option selected in the first listbox.
    Jonathan

  • Calling for objects with specific CMYK values?

    Hello,
    I'm trying to build a script that searches for paths that have specific CMYK values within a document and then edits the opacity of that path. I can specify for it to look only for objects that have a CMYK color but get nothing once I try to specify the CMYK values I'm looking for.
    Additionally, do I need to specify that the output will be a "new CMYKColor", or will it suffice to say "paths[i].fillColor.back = 100.0", for example, in the output. Here's what I have for this particular function:
    var docRef = app.activeDocument;
    var paths = docRef.pathItems;
    for (i=0; i< paths.length; i++) {
    if (paths[i].fillColor.typename == "CMYKColor" ) {
    if (paths[i].fillColor.cyan == 0.0 &&
    paths[i].fillColor.magenta == 0.0 &&
    paths[i].fillColor.yellow == 0.0 &&
    paths[i].fillColor.black == 20.0 &&
    paths[i].opacity == 100.0) {
    var NewColor = new CMYKColor ();
    NewColor.cyan = 0.0;
    NewColor.magenta = 0.0;
    NewColor.yellow = 0.0;
    NewColor.black = 100.0;
    paths[i].opacity = 20;
    else {
    alert ("Object(s) not recognized.")
    else {
    alert ("Object not CMYK.")
    Thank you.

    Hi Silly-V,
    no, thats's not odd.
    Illustrator is a little bit crazy. The most values should be rounded when reading. (like in this thread: Re: Working on a script that will add a new artboard and delete the old one if it is not a specific size)
    And so Luis Oyola can do something like that:
    var docRef = app.activeDocument;
    var paths = docRef.pathItems;
    for (i=0; i< paths.length; i++) {
        if (paths[i].fillColor.typename == "CMYKColor" ) {
            if (Math.round(paths[i].fillColor.cyan) == 0.0 &&
                Math.round(paths[i].fillColor.magenta) == 0.0 &&
                Math.round(paths[i].fillColor.yellow) == 0.0 &&
                Math.round(paths[i].fillColor.black) == 20.0 &&
                Math.round(paths[i].opacity) == 100.0) {
                    paths[i].fillColor.black = 100;
                    paths[i].opacity = 20;
                    } else {
                        alert ("Object(s) not recognized.");
                    } else {
                        alert ("Object not CMYK.");
    Have fun

  • How to make a spot swatch with specific name by using AppleScript?

    Hi there,
    I am trying to create a script in AppleScript to make a new spot color swatch that must be the COLOR TYPE : SPOT (with specific values). I've got it to make a global process color but can't seem to make a spot swatch. I'm using the script below :
    tell application "Adobe Illustrator"
        set docColorSpace to color space of document 1
        if (docColorSpace is CMYK) then
            set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
        else
            set SpotColor to {red:0.0, green:174.0, blue:239.0}
        end if
        make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor}
    end tell
    I did find an entry in an old forum that did this using javascript, however, I am not experienced with this at all and have no idea what or how to use it on a mac platform. This script is listed below.
    #target illustrator
    var docRef = app.activeDocument;
    var newCMYK = new CMYKColor();
    newCMYK.cyan = 100;
    newCMYK.magenta = 0;
    newCMYK.yellow = 0;
    newCMYK.black = 0;
    var thisSpot = docRef.spots.add();
    thisSpot.name = 'ADHESIVE';
    thisSpot.color = newCMYK;
    thisSpot.colorType = ColorModel.SPOT;
    Any help would be greatly appreciated.
    Thank you!

    You are close but missing the last property listed in the JavaScript… It translates to… 'color type:spot color'
    tell application "Adobe Illustrator"
    set docColorSpace to color space of document 1
    if (docColorSpace is CMYK) then
    set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
    else
    set SpotColor to {red:0.0, green:174.0, blue:239.0}
    end if
    make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor, color type:spot color}
    end tell
    BTW… The use of JavaScript in the CS apps is more common because of its 'platform independence' There is a toolkit supplied along with the CS install.

  • How to group similar values using XQuery

    I have a table Employee with following columns
    EmpNo number,
    Title varchar2(100),
    First_Name varchar2(100),
    Last_Name varchar2(100),
    1, Miss, A, B (Sample record in Employee Table)
    There is an audit table Employee_A with columns
    ID number (PK),
    EmpNo number,
    Field_Name varchar2(100),
    Old_Value varchar2(100),
    New_Value varchar2(100)
    An update statement causes the Title of EmpNo=1 to change from Miss to Mrs and Last_Name from B to C. Hence the audit table has two records
    1,1,Title, Miss,Mrs
    2,1,Last_Name, B, C
    I need to generate an xml which is as follows:
    <Tag>
    <Operation>Update</Operation>
    <Key>1</Key>
    <Data>
    <Field>
    <Column>Title</Column>
    <NewValue>Mrs</NewValue>
    </Field>
    <Field>
    <Column>Last_Name</Column>
    <NewValue>C</NewValue>
    </Field>
    <Data>
    </Tag>
    How can we do this using XQuery?
    If not, can we do this using xmlelement, xmlagg?

    I tried the following:
    SELECT XMLQuery('<Dummy>
    {for $c in ora:view("Employee"),
               $ca in ora:view("Employee_A")
           let $emp := $c/ROW/EMPNO/text(),
               $emp_a := $ca/ROW/EMPNO/text(),
               $field := $ca/ROW/FIELD_NAME/text(),
               $new := $ca/ROW/NEW_VALUE/text()
               where $emp = $emp_a
           return
           <Tag>
             <operation>Update</operation>
             <key_id>$emp_a</key_id>
             <Data>
             <Field>
               <Column>{$field}</ent_id>
    <NewValue>{$new}</NewValue>
    </Field>
    </Data>
    </Tag>
    }</Dummy' RETURNING CONTENT)
    FROM dual;
    The output that I'm getting is
    <Dummy
    <Tag>
    <Operation>Update</Operation>
    <Key>1</Key>
    <Data>
    <Field>
    <Column>Title</Column>
    <NewValue>Mrs</NewValue>
    </Field>
    <Data>
    </Tag>
    <Tag>
    <Operation>Update</Operation>
    <Key>1</Key>
    <Data>
    <Field>
    <Column>Last_Name</Column>
    <NewValue>C</NewValue>
    </Field>
    <Data>
    </Tag>
    </Dummy>
    Two <Tag></Tag> gets created - one for each update entry. Please help

  • Output XML with a default namespace using XQuery

    I'm having a problem with namespaces in an XQuery within ALSB.
    We receive XML from a file which doesn't have any namespace and have to transform it into a different structure, giving it a default namespace such as below:
    Input XML
    <inputRoot>
         <inputAccountName>Joe Bloggs</inputAccountName>
         <inputAccountNumber>10938393</inputAccountNumber>
    </inputRoot>
    Desired output XML
    <outputRoot xmlns="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>Joe Bloggs</outputAccountName>
              <outputAccountNumber>10938393</outputAccountNumber>
         </outputAccounts>
    </outputRoot>
    When I attempt to do this using XQuery mapper tool, I end up with a namespace prefix on the outputRoot. The XQuery and result follows:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare namespace ns0 = "http://www.example.org/outputSchema";
    declare function xf:test($inputRoot1 as element(inputRoot))
    as element(ns0:outputRoot) {
    <ns0:outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </ns0:outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)
    Result
    <ns0:outputRoot xmlns:ns0="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>inputAccountName_1</outputAccountName>
              <outputAccountNumber>inputAccountNumber_1</outputAccountNumber>
         </outputAccounts>
    </ns0:outputRoot>
    How can I write the XQuery in such a way thay the namespace prefix isn't output? I've tried many different methods with no success. I can't declare a default element namespace because my input element doesn't have a namespace
    Thanks in advance

    I spoke too soon, it didn't work quite as perfectly as I'd thought :-) It turns out our client can't handle the xml with the namespace prefix but we've worked out the solution to return XML in the format we originally needed.
    Example below:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare default element namespace "http://www.example.org/outputSchema";
    declare namespace ns1 = ""
    declare function xf:test($inputRoot1 as element(ns1:inputRoot))
    as element(outputRoot) {
    <outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)

  • Select XML Node by a specific attribute value

    I am newbie for LifeCyle.
    This might be an easy question, but it really got me here.
    I am trying bind xml data into a Drop-Down List. The databinding is working fine, but I would like to have more specific node selected from the xml file by using a attribute value.
    for example Code in AS 3.0
    root.node.(@id=="1").subNode
    How could i do the same thing in LifeCycle Designer 8.0
    Thank you in advance!!!

    there's no native method for this, maybe you should create some functions for this. just like
    private function setAttribute(node:XML, name:String, value:String, index:int = -1):void
        var attrs:XMLList = node.attributes().copy(),
            l:int = attrs.length();
        if(index == -1 || index > l - 1)
            node.@[name] = value;
        else
            delete node.@*;
            var idx:int = 0;
            for (var i:int = 0; i < l + 1; i++)
                if(i == index)
                    node.@[name] = value;
                else
                    var attr:XML = attrs[idx];
                    node.@[attr.name()] = attr.toString();
                    idx++;
    and use it like this:
    setAttribute(myNode, "otherAttribute", "abc", 0);

  • Selecting missing date range with previous records value

    Hello,
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SET DEFINE OFF;
    create table t(NBR_OF_S number, NBR_OF_C number, S_DATE date);
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (34, 40, TO_DATE('05/01/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (27, 29, TO_DATE('03/01/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (21, 23, TO_DATE('12/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (19, 20, TO_DATE('10/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (18, 19, TO_DATE('09/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (17, 17, TO_DATE('08/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (16, 16, TO_DATE('06/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (9, 9, TO_DATE('12/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (5, 5, TO_DATE('11/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into  T
       (NBR_OF_S, NBR_OF_C, S_DATE)
    Values
       (2, 2, TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;
    SQL> select * from t order by 3 desc;
      NBR_OF_S   NBR_OF_C S_DATE
            34         40 01-MAY-12
            27         29 01-MAR-12
            21         23 01-DEC-11
            19         20 01-OCT-11
            18         19 01-SEP-11
            17         17 01-AUG-11
            16         16 01-JUN-11
             9          9 01-DEC-10
             5          5 01-NOV-10
             2          2 01-JAN-10
    10 rows selected.I want the output like as follows, all those missing date i need to carry on the last one's number
      NBR_OF_S   NBR_OF_C S_DATE
            34         40 01-MAY-12
            27         29 01-APR-12
            27         29 01-MAR-12
            21         23 01-FEB-12
            21         23 01-JAN-12
            21         23 01-DEC-11
            19         20 01-NOV-11
            19         20 01-OCT-11
            18         19 01-SEP-11
            17         17 01-AUG-11
            16         16 01-JUL-11
            16         16 01-JUN-11
             9          9 01-MAY-11
             9          9 01-APR-11
             9          9 01-MAR-11
             9          9 01-FEB-11
             9          9 01-JAN-11
             9          9 01-DEC-10
             5          5 01-NOV-10
             2          2 01-OCT-10
             2          2 01-SEP-10
             2          2 01-AUG-10
             2          2 01-JUL-10
             2          2 01-JUN-10
             2          2 01-MAY-10
             2          2 01-APR-10
             2          2 01-MAR-10
             2          2 01-FEB-10
             2          2 01-JAN-10Any help would be greatly appreciate.
    Note: The date value I have created for this sample is monthly, based on the condition the data value I may need to generate weekly also. That's Monthly or weekly either one
    Thanks,

    And what is AMT? You didn't provide such column in your original post. Anyway, MODEL solution based on original post:
    select  nbr_of_s,
            nbr_of_c,
            s_date
      from  t
      model
        partition by(rowid)
        dimension by(1 d)
        measures(
                 nbr_of_s,
                 nbr_of_c,
                 s_date,
                 months_between(lag(s_date) over(order by s_date desc),s_date) cnt
        rules(
              nbr_of_s[for d from 1 to cnt[1] increment 1] = nbr_of_s[1],
              nbr_of_c[for d from 1 to cnt[1] increment 1] = nbr_of_c[1],
                s_date[for d from 1 to cnt[1] increment 1] = add_months(s_date[1],cv(d) - 1)
      order by s_date desc
      NBR_OF_S   NBR_OF_C S_DATE   
            34         40 01-MAY-12
            27         29 01-APR-12
            27         29 01-MAR-12
            21         23 01-FEB-12
            21         23 01-JAN-12
            21         23 01-DEC-11
            19         20 01-NOV-11
            19         20 01-OCT-11
      NBR_OF_S   NBR_OF_C S_DATE   
            18         19 01-SEP-11
            17         17 01-AUG-11
            16         16 01-JUL-11
            16         16 01-JUN-11
             9          9 01-MAY-11
             9          9 01-APR-11
             9          9 01-MAR-11
             9          9 01-FEB-11
      NBR_OF_S   NBR_OF_C S_DATE   
             9          9 01-JAN-11
             9          9 01-DEC-10
             5          5 01-NOV-10
             2          2 01-OCT-10
             2          2 01-SEP-10
             2          2 01-AUG-10
             2          2 01-JUL-10
             2          2 01-JUN-10
      NBR_OF_S   NBR_OF_C S_DATE   
             2          2 01-MAY-10
             2          2 01-APR-10
             2          2 01-MAR-10
             2          2 01-FEB-10
             2          2 01-JAN-10
    29 rows selected.
    SQL> SY.
    Edited by: Solomon Yakobson on Jun 11, 2012 1:34 PM

  • How Select All Text Objects with Specific Contents and Move to Top-Center?

    Mavens,
    In a ~230 page InDesign CC Book (9 INDD files), on about ~35 pages, there is a small text block with the word "NOTES."
    Currently, the NOTES text block is in the Middle-Center of the page. I would like to find a way for InDesign to move all ~35 instances of the NOTES text block to the Top-Center (of the page each text block is on).
    Is there an easy way to do this with Edit --> Find/Change?
    Thanks!

    Probably not.
    That text block really belongs on a master page applied to those 35 pages, and if it is, all you have to do is move it on the master page. If it isn't, you've got some work to do. Probably easiest to fix one, then coy it and use Paste in Place on the other pages, and delete the frame that's in the wrong place.

  • Can a script randomly select an action within a specific set for use on multiple images?

    Hi there.
    I have a folder of 200+ similar images (taken in a photobooth).
    I have made 8 seperate actions within the same set that apply slightly different textures to a image. Actions are titled 1, 2, 3 ...etc.
    I am wanting a way to get all the images to have one of the actions (randomly selected) applied to them.
    I'm pretty confident that this could be achieved with scripting, but have no idea how to write one.
    If the images were sequecnially applied to action 1 then 2 then 3 and so on (repeating when back to 8) this would also be suitable.
    I am fairly new to scripting so please keep answers simple where possible,
    Many thanks.
    Wil Stevens

    Something like this?
    // make variable to hold the name of the action set
    var actionSet = "myActionSet";
    // make variable to hold an array of action names you want to use from that set
    var actionArray = ["Action 1","Action 2","Action 3","Action 4","Action 5","Action 6","Action 7","Action 8"];
    // either hard code the folder path
    // var sourceFolder = new Folder('~/desktop/booth');
    // or prompt for folder
    var sourceFolder = Folder.selectDialog("Select the booth pix folder");
    // if prompting user make sure they didn't cancel the dialog without selecting a folder
    if(sourceFolder != null ) {
        // make variable for processed folder
        var processedFolder = new Folder(sourceFolder+'/processed');
        // make sure it exists
        if(!processedFolder.exists) processedFolder.create();
        // get the files from the folder using a mask to only get certain file extensions
        var files = sourceFolder.getFiles(/\.jpg$/i);// here we are only getting jpeg files with .jpg or .JPG extension
        // now loop through the files and apply random action
        for(var f=0;f<files.length;f++){
            // open a file in the files array
            var currentDoc = app.open(files[f]);
            // generate a random number between 0 and 7 ( array index is zero based )
            var rand = Math.floor((8)*Math.random());
            // apply a random action to the opened document
            app.doAction(actionArray[rand], actionSet );
            // make variable for the new file path
            var saveFile = new File(processedFolder+'/'+files[f].name);
            // save the file
            SaveAsJPEG( saveFile, 8, true );
            // close the doc
            currentDoc.close(SaveOptions.DONOTSAVECHANGES);
            // done with this file so loop to next
         }// end of loop
        // done with all the files in the files array
        alert('Done');
    }// end of if valid folder
    // function to save jpeg
    function SaveAsJPEG( inFileName, inQuality, inEmbedICC ) {
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = inQuality;
    jpegOptions.embedColorProfile = inEmbedICC;
    app.activeDocument.saveAs( File( inFileName ), jpegOptions );

  • Open vi file with specific Labview version using batch file (Windows)

    I want to open certain vi with using Windows batch file and to use specific version of Labview development system. I tried
    "C:\Program Files (x86)\National Instruments\LabVIEW 2012\LabVIEW.exe" "path_to_vi"
    "C:\Program Files\National Instruments\LabVIEW 2012\LabVIEW.exe" "path_to_vi"
    to use 32-bit and 64-bit development systems respectively. However Labview opens file with version which was last used before. Are there any ways to force it use specified version?

    No, it's a VI I wrote so that when I open any VI from Windows Explorer it will open it in correct version of LabVIEW according to it's source version (rather than the latest/last version of LabVIEW I opened). All it does to launch the right version of LabVIEW is to call System Exec with the path to the correct version of the LabVIEW.exe and the path to the VI - which is essentially the same as what your batch file is doing.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Retrieve Distinct Values using XQuery

    The following query is returning me duplicate rows. How can we retrieve the distinct values? Can we use Distinct somewhere in this query? Please help me.
    SELECT XMLQuery('<Update>
    { for $demo in (ora:view("TableA")),
    $demo_audit in ora:view("TableA_AUDIT")
    let $demo_id := $demo/ROW/ID/text(),
    $demo_audit_trans_date := $demo_audit/ROW/DATE/text(),
    $demo_audit_id := $demo_audit/ROW/ID/text(),
    $demo_audit_type := $demo_audit/ROW/TYPE/text()
    where $demo_id = $demo_audit_id and
    $demo_audit_type = "U"
    return
    <result>
    <type>U</type>
    <id>{$demo_id}</id>
    </result>}</Data>' RETURNING CONTENT)
    FROM dual;

    Geoff,
    I tried distinct-values in both let and return; however the result isn't distinct. Is the usage correct?
    SELECT XMLQuery('<Update>
    {for   $a in ora:view("EMP")
           let   $a_empno         := distinct-values($a/ROW/EMPNO/text()),
                 $a_ename         := $a/ROW/ENAME/text(),
                 $a_job           := $a/ROW/JOB/text(),
                 $a_mgr           := $a/ROW/MGR/text(),
                 $a_deptno        := distinct-values($a/ROW/DEPTNO/text())
           return
           <op>
                 <empno>{distinct-values($a_empno)}</empno>
    <name>{$a_ename}</name>
    <deptno>{distinct-values($a_deptno)}</deptno>
    </op>}
    </Update>'
    RETURNING CONTENT)
    FROM dual;
    The output generated is given below:
    <Update>
    <op>
    <empno>1</empno>
    <name>Henry</name>
    <deptno>10</deptno>
    </op>
    <op>
    <empno>1</empno>
    <name>Henry1</name>
    <deptno>10</deptno>
    </op>
    </Update>

  • Default form value using sql with bind variable

    I wish to create a form based upon a table with a foreign key. I wish to add a field to the form that is an uneditable text field with a default value using sql of 'select name from other_table where other_table_id = ?' where ? is a bind variable defined by a hidden field which is the value of the foreign key identified at runtime. How can this be done?
    null

    I don't think that will work. I have multiple people accessing the Portal at the same time with the same login (or lack of as public will be the most common user). I could set it easily enough as the value is passed to the form by a link object, so I could add it to the before page plsql block and set the value. But I am uncertain how it will behave in a multi-user mutlitasking environment.
    Maybe I should describe what I am looking to accomplish. I want to create a display above a form that will list static details from other tables (i.e. when editing a user's phone number, which is in one table, you want the user to see the person's name, which is in another table, and the form is based upon the phone table) ...
    Just as I am thinking about it, I thought of an idea. I could put some specific code in the before displaying page plsql section to query the database and use htp to output the information for data not in the table the form is based upon. I will try this and see how it works. It would have been nice to have just created a field that is not editable and had a default value, but this should work as well.
    Let me know if you see any problem with this or if you have any better suggestions.
    Thanks for the fast response.

  • Data Selection for report based upon a 'Prompt Value'

    I want to report information in my report based upon a 'user input prompt value'
    for example:
    'Enter Shareholder Selection - A-Active, I-Inactive, B-Both Active and Inactive'
    if the user enters 'A', the report selects only active shareholders
    if the user enters 'I', the report selects only inactive shareholders
    if the user enters 'B' the report selects all shareholders, active and inactive
    the field in the database that this based upon is their total share value.
    if this field is greater than zero (>0) they are considerd 'active'
    if this field is equal to zero (=0) they are considered 'inactive'.
    I have tried creating some type of filter,  but am not having any luck. 
    I saw a few examples within the forums that I have tried without any luck....unfortunately most of the examples I've seen are base one only two choices.
    I'm sure I need to create some type of 'independant varible' but am not sure how to do that either.
    Any suggestions would be appreciated.
    Thanks.

    Hi Daryl,
    I Tried this unsuccessfully in DESKI . We can't Eliminate Rows having Empty Measure Values or Measure with 0 as values using Table Level Filter as FIlter can't FIlter rows based on Prompt value selection dynamically. Filters filter rows at a time and not based on 3 condition as Active, Inactive and Both. thus filters are of no use.
    I Tried this in WEBI, and it is working perfectly you donu2019t have to create any Object in Universe, you can do it using function UserResponse() at report level.
    Hence if you are comfortable using WEBI for Generating this report then Follow the steps.
    1. Create Report With Name and Shares Object. It will display all Shareholder Names and No.of shares they hold.
    2. Use Status Object in Query filter, use condition as u201CEqual Tou201D and Select prompt. It  contains Active, Inactive and Both as values.
    3. Report will Display all Shareholder names and No. of  shares  like 45, 789, 0, 4562 where 0 is inactive Shareholder and all other are active shareholder.
    4. Create Variable using Formula.
    =If(UserResponse("Enter Status:")="Active" And [Shares]>0;[Shares];If(UserResponse("Enter Status:")="Inactive" And [Shares]<=0;[Shares];If(UserResponse("Enter Status:")="Both";[Shares])))
    5. Remove Shares Object from the report and Put Variable created with Names of Shareholders.
    6. Select Table-> Properties-> Display-> Uncheck the Option u201CShow Rows with Empty Measure Valuesu201D
    7. Report will display Value correctly as per your Prompt value selection.
    I Hope this Helpsu2026
    Thanksu2026
    Pratik

  • Can I rename *selected* layers with scripting?

    Hello forum,
    Let me just start off by saying I know NOTHING about Photoshop scripting.
    But I recently encountered a need to rename a whole stack of layers in a certain file, so I went Googling...
    I came across this Rename Layers script -- http://morris-photographics.com/photoshop/scripts/rename-layers.html
    However, I was specifically interested in only renaming the layers that I have got selected in the Layers panel.
    This script unfortunately renames *ALL* layers in the document.
    Is it even possible to do what I want?
    Thanks.

    Is it even possible to do what I want?
    Yes. And the simplest thing to do is ask Trevor (the author) to tweak the script for you. If he's not slammed with other work, he should be able to help you out.

Maybe you are looking for

  • How to set Proxy for IE 8.0 on doing Load Testing with OATS 12.1.0.2

    I have tried adding proxy server by adding the address to "Localhost" and Port as 8080. but nothing is working out, for recording an EBS instance its working fine ,no need to setup anything in the OATS tool, eg, Proxy settings. But when it comes to B

  • Sending a PDF document as a file attachment

    Hi, I have encountered the following problem: When attaching a pdf document to an email and sending it via Javamail, the resulting PDF document on the other end (i.e. when opened via an email client, such as Outlook) is corrupted and cannot be opened

  • XSL rendering in pageflows

    Hi, We have an application that uses Struts 1.1 with an XSLT servlet to do the rendering. Basically, the app never forwards to a .jsp but to destinations intercepted by the XSLT servlet that uses the destination URI to fetch an XSL template and rende

  • Error code 8070490 when downloading WhatsApp.

    Hello Aleisha, I own a nokia Lumia 630. I have tried downloading wtsapp on it countless number of times and i am unable to. I am getting the error code 8070490. I was wondering if you could suggest me how to accomplish that on this very specific mode

  • Subclips different on export

    I taped a conference with 2 cams. I synced the cameras and let them run the full hour. Cam 2 I split into subclips for cutaways on V2. All is good in the timeline but after export the V2 cutaways are not the part of the tape I subclipped. Not even cl