Check for empty visa resource?

When I am developing the VI at my desk and not a the test station PC, the VISA resource name is empty.
Once the VI is moved to the test station PC, the user can select a VXI board.
How do I make sure the user has selected a VISA resource before continuing?
I can wire a Comparision to check for Empty String, and that works. But is there any method that I should use?
Solved!
Go to Solution.

Additionally, you can limit the selectable items by interface type. Right-click VISA Resource Name Control and select I/O Name Filtering.
National Instruments
Product Support Engineer

Similar Messages

  • Check for empty session variable

    Hey there we're making a login for our jsp web application.
    The login allready works and so does the log out but now we want to make a check to make it impossible to login with names that are not in the database.
    So what basicly happens is as follows...
    Login reads the database info:
    while (rs.next()) {
         if (request.getParameter("username").equals(rs.getString("username")) && request.getParameter("password").equals(rs.getString("password"))){
              session.setAttribute("username", rs.getString("username"));
              session.setAttribute("firstname", rs.getString("first_name"));
              session.setAttribute("lastname", rs.getString("last_name"));
    }but when you enter invalid information teh session variabe "lastname" for example should read null. Now we want to make a check for this null value, which should look something like this:
    if(session.getAttribute("username").equals(null)){
         response.setStatus(301);
         response.setHeader("Location", "/index.jsp");
    } else {
         response.setStatus(301);
         response.setHeader("Location", "/mainmenu.jsp");
    }But this doesnt work, it just logs in with the null values... any1 got a clue??
    edit: im actually looking for something like the isSet command in PHP to give an idea...
    Message was edited by:
    whappit

    Your test for null will always fail, because request.getParameter("username") is NEVER null, in that it exists, even though it contains no data.
    Try .equals(""); instead.

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

  • PL SQL block - Check for empty file

    Hello,
    I need help in writing pl sql code to check a file to verify if it has 0 records (file size = zero kb.) In a preceding pl sql block, I am performing a SELECT on data and writing it to a file. If that file is empty/has no records, then I would like to stop the process from continuing on to my next pl sql block which performs an update function.
    Summary:
    1) Create file from SELECT
    2) Check file for zero data, if true, trigger error, if false, continue to next pl sql block.
    3) Run update on records if data exists in the file.
    Thanks in advance!

    Thanks John,
    You've been of great help so far and a really appreciate it. I'm so close to getting this, I just need help with how to create an error when the file shows no data. I will be running this as an Oracle Apps Concurrent request. I'd like for the job to end in error when no data exists for the file. In unix, I can enter "EXIT 1" and it signals to the concurrent manager to put end the job with an error status. How can I do something similar using pl sql? Here is my code so far, with the missing piece. Thanks!
    DECLARE
      vFile UTL_FILE.FILE_TYPE;
      vrecs BOOLEAN := FALSE;
      vnodata EXCEPTION;
    BEGIN
      vFile := UTL_FILE.FOPEN('/devlop, 'norecs.txt', 'w', 32767);
    FOR x IN (
    SELECT
         node_name AS txt
    FROM
         applsys.fnd_nodes
    WHERE
         node_name = 'blahblahblah'
    LOOP
            vrecs := TRUE;
            UTL_FILE.PUT_LINE (vFile, x.txt);
    END LOOP;
            UTL_FILE.FCLOSE(vFile);
            IF NOT vrecs THEN
                RAISE vnodata;
            END IF;     
    EXCEPTION
           WHEN vnodata THEN
        *<what can I put here to cause the pl sql block to error???>*
    END;
    /

  • Checking for empty tags using expression builder for XPATH

    I am creating several filters in a mediator for several parallel paths. I am trying to route the mediator to the correct DB adapter based on what tags are empty in the incoming XML. The XML has 1 required tag and 3 optional. So for the expression, I am using the expression builder to load the tag name then putting either [text()] or [not(text())] immediately after each tag with an "and" in between for the 3 optional elements. The problem I am having is they always return false. For example, if I enter a value for an optional tag and put [text()] after it, it evaluates to false. What is the correct way to check if an element has text or not?
    Thanks in advance!

    Hi,
    Its not recognizing the getVariableData func... instead try this:
    string-length(xpath)>0
    ex: string-length($in.body/imp1:manoj/imp1:C1)>0
    It works... Happy deploying ... :)

  • Need help understanding whats wrong with ASP checking for empty fields.

    Can anyone tell me whats wrong with these if statements: If i
    sumbit the
    form providing everything except the dream_inscript field it
    gives me this
    error:
    =================================================
    Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
    [Microsoft][ODBC Microsoft Access Driver]Invalid string or
    buffer length
    /purch_confirm_mail.asp, line 67
    =================================================
    If i submit the form and provide just that field along with
    the first 4
    which are automatically passed from the DB the form submits
    fine and no
    problem.. I know it has something to do with my If
    Statements..
    Basically i want to check the 4 fields:
    dream_inscript If this one is -1 then pass N/A to the db
    dream_price If dream_inscript <> -1 then pass 45 to the
    db
    dream_comm if dream_comm is empty then pass N/A to the db
    custom_inscript if custom_inscript is empty then pass N/A to
    the db
    custom_wanted if this is Y then pass 45 to the db
    custom_comm if this is empty then pass N/A to the db
    MM_editCmd.CommandText = "INSERT INTO tbMailOrders
    (item_number,
    item_summary, item_price, shipping_cost, dream_price,
    dream_inscript,
    dream_comm, custom_comm, custom_price, video_wanted,
    video_price,
    grandtotal, cs_name, pp_email, c_email) VALUES (?, ?, ?, ?,
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    1, 10, Request.Form("item_number")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202,
    1, 255, Request.Form("item_summary")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 202,
    1, 10, Request.Form("itemprice")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    1, 10, Request.Form("shippingcost")) ' adVarWChar
    If cStr(Request.Form("dream_inscript"))<> "-1" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202, 1,
    10, "45") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    1, 10, "0.00") ' adVarWChar
    End If
    If cStr(Request.Form("dream_inscript"))<> "-1" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203, 1,
    1073741823, Request.Form("dream_inscript")) ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    End If
    If Len(cStr(Request.Form("dream_comm")))= "0" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    1, 1073741823, Request.Form("dream_comm")) ' adLongVarWChar
    End If
    If Len(cStr(Request.Form("custom_inscript")))= "0" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203,
    1, 1073741823, "N/A") ' adLongVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203, 1,
    1073741823, Request.Form("custom_inscript")) ' adLongVarWChar
    End If
    If Request.Form("custom_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 10, "45") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    1, 10, "0.00") ' adVarWChar
    End If
    If Request.Form("video_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    1, 10, "Yes") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    1, 10, "No") ' adVarWChar
    End If
    If Request.Form("video_wanted")= "Y" Then
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202, 1,
    10, "15") ' adVarWChar
    Else
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202,
    1, 10, 0.00) ' adVarWChar
    End If
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param12", 202,
    1, 10, Request.Form("grand")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param13", 202,
    1, 255, Request.Form("name")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param14", 202,
    1, 255, Request.Form("email")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param15", 202,
    1, 255, Request.Form("email2")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ASP, SQL2005, DW8 VBScript, Access

    issue corrected.
    ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio
    2008
    "Daniel" <[email protected]> wrote in message
    news:[email protected]...
    > Can anyone tell me whats wrong with these if statements:
    If i sumbit the
    > form providing everything except the dream_inscript
    field it gives me this
    > error:
    > =================================================
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e57'
    > [Microsoft][ODBC Microsoft Access Driver]Invalid string
    or buffer length
    >
    > /purch_confirm_mail.asp, line 67
    > =================================================
    > If i submit the form and provide just that field along
    with the first 4
    > which are automatically passed from the DB the form
    submits fine and no
    > problem.. I know it has something to do with my If
    Statements..
    >
    > Basically i want to check the 4 fields:
    >
    > dream_inscript If this one is -1 then pass N/A to the db
    > dream_price If dream_inscript <> -1 then pass 45
    to the db
    > dream_comm if dream_comm is empty then pass N/A to the
    db
    >
    > custom_inscript if custom_inscript is empty then pass
    N/A to the db
    > custom_wanted if this is Y then pass 45 to the db
    > custom_comm if this is empty then pass N/A to the db
    >
    >
    >
    >
    > MM_editCmd.CommandText = "INSERT INTO tbMailOrders
    (item_number,
    > item_summary, item_price, shipping_cost, dream_price,
    dream_inscript,
    > dream_comm, custom_comm, custom_price, video_wanted,
    video_price,
    > grandtotal, cs_name, pp_email, c_email) VALUES (?, ?, ?,
    > ?, ?, ?, ?, ?, ?)"
    > MM_editCmd.Prepared = true
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202,
    > 1, 10, Request.Form("item_number")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202,
    > 1, 255, Request.Form("item_summary")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 202,
    > 1, 10, Request.Form("itemprice")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 202,
    > 1, 10, Request.Form("shippingcost")) ' adVarWChar
    > If cStr(Request.Form("dream_inscript"))<> "-1"
    Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202, 1,
    > 10, "45") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 202,
    > 1, 10, "0.00") ' adVarWChar
    > End If
    > If cStr(Request.Form("dream_inscript"))<> "-1"
    Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203, 1,
    > 1073741823, Request.Form("dream_inscript")) '
    adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > End If
    > If Len(cStr(Request.Form("dream_comm")))= "0" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param7", 203,
    > 1, 1073741823, Request.Form("dream_comm")) '
    adLongVarWChar
    > End If
    > If Len(cStr(Request.Form("custom_inscript")))= "0" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203,
    > 1, 1073741823, "N/A") ' adLongVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param8", 203, 1,
    > 1073741823, Request.Form("custom_inscript")) '
    adLongVarWChar
    > End If
    > If Request.Form("custom_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 10, "45") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param9", 202,
    > 1, 10, "0.00") ' adVarWChar
    > End If
    > If Request.Form("video_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    > 1, 10, "Yes") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param10", 202,
    > 1, 10, "No") ' adVarWChar
    > End If
    > If Request.Form("video_wanted")= "Y" Then
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202, 1,
    > 10, "15") ' adVarWChar
    > Else
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param11", 202,
    > 1, 10, 0.00) ' adVarWChar
    > End If
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param12", 202,
    > 1, 10, Request.Form("grand")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param13", 202,
    > 1, 255, Request.Form("name")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param14", 202,
    > 1, 255, Request.Form("email")) ' adVarWChar
    > MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param15", 202,
    > 1, 255, Request.Form("email2")) ' adVarWChar
    > MM_editCmd.Execute
    > MM_editCmd.ActiveConnection.Close
    >
    > --
    > ************************************************
    > ASP, SQL2005, DW8 VBScript, Access
    >

  • Check for empty cell in report

    I have a report that displays true or false in the rows for a number of automobile models that are the columns.
    I have the case statement below setup in the column formula section of one of my columns.  It does kind of work, but if "FT_AUTOS"."productionEnded" is nothing(i.e. returns nothing, not even NULL), then it will just show a blank cell.  Is there a way to include "empty" so that it also shows up as incomplete?
    case
        when SUM(case when "FT_AUTOS"."productionEnded" IS NOT NULL then 1  else 0 end) > 0 
        then '<div title= "True"  style="background:#00ff00;text-align:center">'||'True'||'</div>' 
        else  '<div title= "False"  style="background:#ff0000;text-align:center">'||'False'||'</div>' 
    end
    Thanks

    length("FT_AUTOS"."productionEnded")
    might tell you about NULL or '' or ' ' etc
    forget about your report for a while and just pull this column with above expression and then run it, sort it asc
    then look values and then sort to desc

  • Checking for Empty ResultSet

    I am doing an insert into a table, but only if the first name and last name are not already in the table...
    i tried using the wasNull() method but that didn't work,
    Here's the code, I'm sure you'll be able to get the jist of it when you see it...
                Statement SQLStat = ourSiteConn.createStatement();
                String SQL = "SELECT * FROM tblCustomer WHERE FName = '"+FName+"' AND LName = '"+LName+"'";
                rs_CustomerCheck = SQLStat.executeQuery(SQL);
                while (rs_CustomerCheck.next())
                    FNameChk = rs_CustomerCheck.getString(2);
                    LNameChk = rs_CustomerCheck.getString(3);
                if (rs_CustomerCheck.wasNull())
                     //Code for this condition here
                else
                    //Code for this condition here
                }What i'm trying todo is search my DB for the name that the user enters, if it doens't find anything in the DB it should return true right? which would make that work..i think...
    Any idea's would be Much appreciated
    ~Jon

    After you do your query, you want to find out if it returned zero records. If it did, then trying to get the fields from the records is pointless (at least in your current design). So just check to see if you can read the first record, and if you can't then there weren't any records...
    String SQL = "SELECT * FROM tblCustomer WHERE Name = '"+FName+"' AND LName = '"+LName+"'";
    rs_CustomerCheck = SQLStat.executeQuery(SQL);
    if (! rs_CustomerCheck.next()) {
    // query found no records

  • Workflow: check multiline container element for emptiness

    Hi!
    Please suggest how to check multiline workflow-container element for emptiness in condition block.
    Regards,
    Maxim.

    Hi Max,
    One way to do this is to add a process step which calls a function module passing the multiline container as the import parameter. In this function mod, you can check for emptiness and set a variable which will be the export parameter. Map this export parameter of the step to a workflow container field. Finally in the next step (control block) you can check the above workflow field.

  • Advanced search for a price range while checking for an empty values using php in DW

    I am creating an advanced search with DW php. I would like to submit a search where some entrys can be left black. So checking for empty values (which I have managed, thank you David Powel), however when searching between multiple price ranges does not seem to work.
    please see attached forms:
    The search page:
    <form action="Detailed-Search-Result.php" method="get" target="_self"><table width="90%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td colspan="2"><label for="Detailed Search">Advanced Search</label></td>
        </tr><tr>
        <td><label for="Product">Product:</label>
          </td>
        <td><select name="Category" id="Category">
          <option value=></option>
            <option value="Keyboard">Keyboard</option>
            <option value="Piano">Piano</option>
          </select></td>
      </tr>
      <tr>
        <td><label for="Make">Make:</label>
        </td>
        <td><select name="Manufacturer">
          <option value=></option>
          <option value="Boss">Boss</option>
          <option value="Casio">Casio</option>
          <option value="Kawai">Kawai</option>
          <option value="Ketron">Ketron</option>
          <option value="Korg">Korg</option>
          <option value="Roland">Roland</option>
          <option value="Samson">Samson</option>
          <option value="Yamaha">Yamaha</option>
        </select></td>
      </tr>
      <tr>
        <td><label for="Color">Color:</label></td>
        <td><select name="Color">
          <option value=></option>
          <option value="Black">Black</option>
          <option value="Cherry">Cherry</option>
          <option value="Mahogany">Mahogany</option>
          <option value="Polished Eboney">Polished Eboney</option>
          <option value="Rosewood">Rosewood</option>
          <option value="White">White</option>
          <option value="Red">Red</option>
        </select></td>
      </tr>
      <tr>
        <td><label for="Price">Price:</label></td>
        <td><select name="Price">
          <option value=></option>
          <option value="0-500">£0-500</option>
          <option value="500-1000">£500-1000</option>
          <option value="1000-2000">£1000-2000</option>
          <option value="2000">£2000&gt;</option>
        </select></td>
      </tr>
      <tr>
        <td colspan="2">
          <input name="Search2" type="submit" id="Search2"></td>
        </tr>
        </table>
    </form>
    The results page
    $varCategory_rsgetsearch2 = "%";
    if (isset($_GET['Category'])) {
      $varCategory_rsgetsearch2 = $_GET['Category'];
    $varMake_rsgetsearch2 = "%";
    if (isset($_GET['Manufacturer'])) {
      $varMake_rsgetsearch2 = $_GET['Manufacturer'];
    $varColor_rsgetsearch2 = "%";
    if (isset($_GET['Color'])) {
      $varColor_rsgetsearch2 = $_GET['Color'];
    $varPrice_rsgetsearch2 = "%";
    if (isset($_GET['Price'])) {
      $varPrice_rsgetsearch2 = $_GET['Price'];
    mysql_select_db($database_dBconn, $dBconn);
    $query_rsgetsearch2 = 'SELECT * FROM products';
    $where = false;
    if (isset($_GET['Category']) && !empty($_GET['Category'])) {
    $query_rsgetsearch2 .= ' WHERE Category LIKE varCategory '. GetSQLValueString($_GET['Category'], 'text');
      $where = true;
    if (isset($_GET['Manufacturer']) && !empty($_GET['Manufacturer'])) {
      if ($where) {
       $query_rsgetsearch2 .= ' AND ';
      } else {
       $query_rsgetsearch2 .= ' WHERE ';
        $where = true;
    $query_rsgetsearch2 .= 'Manufacturer LIKE varManufacturer ' . GetSQLValueString($_GET['Manufacturer'], 'text');
    if (isset($_GET['Color']) && !empty($_GET['Color'])) {
        if ($where) {
       $query_rsgetsearch2 .= ' AND ';
      } else {
       $query_rsgetsearch2 .= ' WHERE ';
        $where = true;
      $query_rsgetsearch2 .= 'Color LIKE varColor ' . GetSQLValueString($_GET['Color'], 'text');
    if (isset($_GET['Price']) && !empty($_GET['Price'])) {
        if ($where) {
       $query_rsgetsearch2 .= ' AND ';
      } else {
       $query_rsgetsearch2 .= ' WHERE ';
        $where = true;
    switch( $_GET['Price'] ){
            case '0-500':
            $query_rsgetsearch2 .= '  RRP BETWEEN 0 AND 500 ORDER BY price ASC'. GetSQLValueString($_GET['Price'], 'text');
            break;
              case '500-1000':
            $query_rsgetsearch2 .= ' RRP BETWEEN 500 AND 1000 ORDER BY price ASC'. GetSQLValueString($_GET['Price'], 'text');
            break;
                        case '1000-2000':
            $query_rsgetsearch2 .= ' RRP BETWEEN 1000 AND 2000 ORDER BY price ASC'. GetSQLValueString($_GET['Price'], 'text');
            break;
              case '2000':
           $query_rsgetsearch2 .= ' RRP BETWEEN 2000 AND 10000 ORDER BY price ASC'. GetSQLValueString($_GET['Price'], 'text');
            break;
    $query_rsgetsearch2 = sprintf("SELECT * FROM products WHERE Category LIKE %s AND products.Manufacturer LIKE %s AND products.Color LIKE %s", GetSQLValueString("%" . $varCategory_rsgetsearch2 . "%", "text"),GetSQLValueString("%" . $varMake_rsgetsearch2 . "%", "text"),GetSQLValueString("%" . $varColor_rsgetsearch2 . "%", "text"));
    $query_limit_rsgetsearch2 = sprintf("%s LIMIT %d, %d", $query_rsgetsearch2, $startRow_rsgetsearch2, $maxRows_rsgetsearch2);
    $rsgetsearch2 = mysql_query($query_limit_rsgetsearch2, $dBconn) or die(mysql_error());
    $row_rsgetsearch2 = mysql_fetch_assoc($rsgetsearch2);
    I would be greatfull for any help

    I have managed to solve the problem.
    In the end I didn't check if the values were empty, as it worked fine without. However the switch of the price didn't work in combination with the rest of the query.
    I've solved the problem as follows:
    $varCategory_rsgetsearch2 = "%";
    if (isset($_GET['Category'])) {
      $varCategory_rsgetsearch2 = $_GET['Category'];
    $varMake_rsgetsearch2 = "%";
    if (isset($_GET['Manufacturer'])) {
      $varMake_rsgetsearch2 = $_GET['Manufacturer'];
    $varColor_rsgetsearch2 = "%";
    if (isset($_GET['Color'])) {
      $varColor_rsgetsearch2 = $_GET['Color'];
    $varPrice_rsgetsearch2 = "%";
    if (isset($_GET['Keysound_price'])) {
      $varPrice_rsgetsearch2 = $_GET['price'];
    mysql_select_db($database_dBconn, $dBconn);
    $query_rsgetsearch2 = sprintf("SELECT * FROM products WHERE Category LIKE %s AND products.Manufacturer LIKE %s AND products.Color LIKE %s", GetSQLValueString("%" . $varCategory_rsgetsearch2 . "%", "text"),GetSQLValueString("%" . $varMake_rsgetsearch2 . "%", "text"),GetSQLValueString("%" . $varColor_rsgetsearch2 . "%", "text") );
    switch( $_GET['price'] ){
            case '0-500':
            $query_rsgetsearch2 .= ' AND price BETWEEN 0 AND 500 ORDER BY price ASC';
            break;
              case '500-1000':
            $query_rsgetsearch2 .= ' AND price BETWEEN 500 AND 1000 ORDER BYprice ASC';
            break;
                        case '1000-2000':
            $query_rsgetsearch2 .= ' AND price BETWEEN 1000 AND 2000 ORDER BY price ASC';
            break;
              case '2000':
            $query_rsgetsearch2 .= ' AND price BETWEEN 2000 AND 10000 ORDER BY price ASC';
            break;
    $query_limit_rsgetsearch2 = sprintf("%s LIMIT %d, %d", $query_rsgetsearch2, $startRow_rsgetsearch2, $maxRows_rsgetsearch2);
    $rsgetsearch2 = mysql_query($query_limit_rsgetsearch2, $dBconn) or die(mysql_error());
    $row_rsgetsearch2 = mysql_fetch_assoc($rsgetsearch2);
    I'm sure that you can keep the checking for values in, however for me the was no need for it anymore.
    Thanks for all your help

  • No VISA Resources in Labview but all present in MAX

    Hi,
    I am unable to find any VISA resources from LabVIEW, however, all NI hardware is available and working in MAX. I have just installed a PCI-8433/2 as well as a NI PCI-8512 CAN/HS Card. As part of the installation I believe MAX was upgraded to version 4.6.2. I will attach the max configuration report for those who are interested. I am working with LabView 8.2. I also uninstalled an agilent GPIB card and as a result the NI-GPIB card is the sole controller and is GPIB0... instead of the agilent card.
    I have had a similar problem before that was a result of a corrupted database, but I was unable to find this problem on the forums this time and I am not getting any errors. Just an empty VISA Resource control.
    Any suggestions would be greatly appreciated.
    Nate
    MAX Configuration Report
    12/27/2010 1:35:05 PM
    MAX Summary
    My System
    Data Neighborhood
    CAN Channels
    NI-DAQmx Tasks
    V1P1V2P2
    V3P3
    Devices and Interfaces
    GPIB0 (PCI-GPIB)
    Instrument0
    Instrument1
    Instrument2
    Instrument3
    Instrument4
    Instrument5
    Miscellaneous VISA Resources
    GPIB0::INTFC
    GPIB0::16::INSTR
    GPIB0::2::INSTR
    GPIB0::22::INSTR
    GPIB0::7::INSTR
    GPIB0::10::INSTR
    GPIB0::27::INSTR
    GPIB0::3::INSTR
    Network Devices
    NI-DAQmx Devices
    NI USB-9481: "Dev2"
    NI USB-9481: "Dev1"
    NI-XNET Devices
    NI PCI-8512 CAN/HS
    CAN1
    CAN2
    PCI-8433/2
    Port1
    Port2
    PXI System (Unidentified)
    Serial & Parallel
    COM1
    COM6
    COM9
    LPT1
    Scales
    Software
    IVI Compliance Package 3.3
    LabVIEW 8.2
    LabVIEW Run-Time 7.1
    LabVIEW Run-Time 8.0.1
    LabVIEW Run-Time 8.2.1
    LabVIEW Run-Time 8.5.1
    LabVIEW Run-Time 8.6.1
    LabWindows/CVI Run-Time 9.0
    Measurement & Automation Explorer 4.6.2
    Measurement Studio for VS2005
    DotNET
    Common
    NI LabVIEW SignalExpress 3.0
    NI Spy 2.7.1
    NI-488.2 2.46
    NI-CAN 2.7
    NI-DAQmx 8.7.2
    NI-PAL 2.5.3
    NI-Serial 3.6
    NI-USI 1.0.2
    NI-VISA 4.6.2
    NiVisaServer.exe
    NIvisaic.exe
    NI-VISA Runtime 4.6.2
    NI-XNET 1.1
    IVI Drivers
    Advanced
    Instrument Driver Software Modules
    Simulation Driver Software Modules
    Simulation Driver Sessions
    Driver Sessions
    Logical Names
    -Nate
    Solved!
    Go to Solution.

    Now that IS odd.
    Can you show a couple screen shots from MAX?
    First expand the software tab and post a png of the screenshot (I'm not yet convinced you do not have SOME driver issue)
    Next select MAX>TOOLS>NI VISA>VISA Options- Wait for the new screen then expand Mysystem General settings and select Aliases.
    You could also try "Clear all aliases" from there and reboot.
    Jeff

  • Check for required fields before locking subforms and submitting

    Hello,
    I have a 5-page form with many questions, to be completed by the original requestor and multiple approvers.  What I'm trying to do is have the original requestor's Submit button on p. 3 lock the input on the first three pages, but first check if all those fields have some content.  I currently have all the fields on pp. 1-3 set to "Required" in the object properties, but my script still locks them when there's is one empty one.  Here's what I have:
    //Lock portions of form
    Page1.access = "readOnly"
    Page2.access = "readOnly"
    Page3.access = "readOnly"
    //Save document, allow user to change name
    app.execMenuItem("SaveAs");
    //Submit via e-mail
    Submit_REAL.event__click.submit.target = "mailto:[email protected]" +
    "?subject=Subject text" +
    "&body=Message";
    Submit_REAL.execEvent("click");
    The automatic check for required fields happens after the pages get locked.  I would like the check to stop the process before it locks the pages.  Is there any way to check all at once that all "Required" fields on those pages have some content before allowing the script to proceed?  I know how to script it to manually check the 50 or so questions on those pages, but I would like to avoid that.  Thanks for any help.

    There are a few problems that I can see from the start. First, your code is going to pick up EVERY node that exists on these pages. Some of those nodes will not have a rawValue, and some will not have an actual name. As an example, you can take your code and create a text field to dump all of the names of the nodes that you get when you pull in all of the nodes this way. Here's an example:
    The result:
    Now, the question is, do you have a consistent naming convention for your fields that might be empty? That could be text fields, radio button lists, etc. For instance, I always prefix the names of objects in order to more easily keep track of what they are in scripts. Since I'm doing that, I can check the name of the field for tf, nf, rbl, cb, or whatever I have included to make sure that I'm checking an actual field before I check for things like rawValue.
    var nodeName = oNodes.item(nNodeCount).name;
    if (nodeName.indexOf("tf")>-1 || nodeName.indexOf("rbl") > -1 || /*check other field types*/) {
      //insert your code to check for empty answers here
    As for your line 7 issue. The syntax problem is that you've put extra parentheses in your if statement. Take out the parentheses that are just before and after the or "||".
    *This is my fourth attempt to reply. Something was going on with Adobe/Jive earlier, I suppose.

  • Visa Resource Name in cluster passed to Network Stream writer causes error 42.

    If I try and pass this "motor data" cluster with an embedded VISA resource name:
    to a Network Stream Writer in this manner:
    Then I get this error from the "Write Single Element to Stream" VI
    If I change the motor data cluster TypDef so that a string control is used instead of the VISA reference, the error disappears and the data passes over the Network Stream without problem.
    Is this expected behavior? 
    I thought that the "data in" (type = "POLY"?) like the one found on the "Write Single Element to Stream" VI was supposed to accept pretty much anything...
    Solved!
    Go to Solution.

    Doug
    I would consider this a bug, as the memory location (more precisely the VISA refnum or session) of a VISA resource means nothing on a potentially remote system. Also I was under the impression that most streaming methods like binary file IO, but also the network streams would use the LabVIEW flattened format for data clusters and for that the VISA resource name would be the only logical choice instead of the underlaying VISA refnum, but I might be wrong in this specific case and the default behaviour for flattening VISA resources might always have been to the VISA refnum.
    Considering that the VISA control can resurect the VISA session from a VISA resource name if it is already opened, flattening to the VISA resource name instead would be more logical, but using a string control in the cluster type definition is a reasonable work around of course.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Visa Resource name does not list anything

    Hi,
    I recently installed a Agilent 82357B GPIB and along with it I also installed Agilent IO 16.3. This GPIB is hooked up to a power supply. I am able to find and query the device in MAX and Agilent IO, but when I use the Visa Resource Name control in a VI, it does not list anything. Before I used to see LPT1 and COM1, but now even they have disappeared. All these are present in Device Manager. Even VISA interactive control throw an error. Attached are screenshots for some reference.
    HP_GS
    Attachments:
    VisaResource-Refresh.png ‏2 KB
    Visa-IC.png ‏7 KB

    Hi there,
    You might want to read this post about the specific error.
    Also you need to make sure the right class is slected for the visa resource (right click):
    Hope that helps, regards W

  • Check for null and empty - Arraylist

    Hello all,
    Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
    <c:if test="${!empty sampleList}">
    </c:if>
    Help is greatly appreciated.
    Thanks,
    Greeshma...

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

Maybe you are looking for