How to activate several Formatted Search Forms !!

Hi Guys,
I have a problem concerning the manipulation of formated Search Forms. Actually when using the ActivatMenuItem() method, one needs a UID of the items to be activated. And I would like to use this method to activate several formated Search Forms but I don't know how to get the UID of those formatted Search Forms.
While searching on the Forum, I have seen that some developers used following command SBO_Application.ActivateMenuItem("7425");
I tried that and it works, but it only activates the first formatted Search Form saved in the CSHS table. My problem is how to activate the other formatted Search Forms and how to access their UID.
Thanks in advance for Responding
Bop

Formatted searches are tied to an individual field on the screen.
They are not launched by individual UID's, there is only one formatted search menu UID - 7425.
The actual screen that is called is based on which field the focus is currently in.  If you are in form UID "1", field UID "1" it will call the formatted search (defined in CSHS) for Form 1 / Item 1.  If the focus is currently in field UID "2", it will call a different search.  If there is no formatted search defined on CSHS for the current field, then it will display a dialog asking if you want to create one.
If you want to open other formatted searches for different fields in your form, simply place the focus on them before calling ActivateMenuItem("7425").  You can do this using the Click method.
John.

Similar Messages

  • Formatted Search Forms

    Hi Guys,
    Thanks very much to John for the answer concerning the formatted Search Form.
    But I still have the problem that although the formatted Search has already been defined, the system is always asking if I would to define a new formatted Search,
    Has someone already face the same problem ?? and do you know to solve that??
    Thanks,
    Bop

    Did you define the formatted search by setting up the details in the standard prompt screen, or did you use SQL to update the CSHS table?
    If you did it by SQL updates, then it is possible you haven't updated all the fields exactly as required.  If for example you leave the ColID field blank because you are not dealing with a matrix it won't work and will prompt you to define a new search.  This field requires "-1" in it for the search to work.  Mistakes in the other fields can also cause the same behaviour.
    If you are doing it via sql, I would suggest that you first set it up through the standard dialog, test it and note all of the field settings.  You can then delete it and reproduce them all settings through SQL.
    It would be great if CSHS was exposed through the SDK - that would eliminate these types of problems.
    John.

  • How to build an adf search form

    How to build an adf search form without using the view criteria out of box search functionality provided by adf

    my query is this .. but still i face the same problem... missing in or out parameter at index ::1
    select ms.state_name,
    sum(decode(mp.status,'12',1,0)) cnt_active,
    sum(decode( mp.status,'12',mh.chargesheet_name,0)) sum_active,
    sum(decode(mp.status,'18',1,0)) cnt_inactive,
    sum(decode( mp.status,'18',mh.chargesheet_name,0)) sum_inactive,
    sum(decode(mp.status,'',1,'5',1,'16',1,'17',1,0)) cnt_expired,
    sum(decode( mp.status,'',mh.chargesheet_name,'5',mh.chargesheet_name,'16',mh.chargesheet_name,'17',mh.chargesheet_name,0)) sum_expired
    from mst_pindetails mp,
    mst_batchno mb,
    mst_chargesheet_hdr mh,
    mst_state ms
    where mp.swhbatchcode=mb.swhbatchcode
    and mb.chargesheetno = mh.chargesheet_code
    and trim(ms.state_id) = mb.statecode and mp.status=nvl(:pstatus, mp.status) and ms.state_name=nvl(:pstatename,ms.state_name) and mp.attribute_date1 >= nvl(:pfromdate,mp.attribute_date1) and mp.attribute_date1 <= nvl(:ptodate,mp.attribute_date1)
    group by state_name

  • HOW TO CREATE A KEYWORD SEARCH FORM

    Hi, I'm creating a image gallery and I'm about 90% complete. One of my  final objectives is to create a keyword search for my image gallery. I  have 4 fields in my DB, (id,image,description,keywords) I want to be  able to enter keywords into the text field  and the images with there  descriptions show up. I already have the  keywords in my mysql, I already know how to use mysql, I just need to learn how to add a search form that pulls keywords from my mysql. THIS DOES NOT REQUIRE ANY CODE so please do not respond with code. I just need a step by step on what type of form to insert, (dynamic text field or text field) what paramaters to pass etc. NO CODE, this whole thing can be done in design veiw.
    For this project I'm using Dreamweaver Cs5, I'm not really an  experienced coder I rely heavily on dreamweaver for my code, I just make  minor tweaks. So if anyone has an answer to my problem please break  down and simplify your answer I'm still a beginner. Thanks in advance.
    ps
    If anyone knows of any other video tutorials of this process please inform me, it would be greatly appreciated, thank you.(not php acedemies)

    This is helpfull but I'm still running in to some problems. I believe everything on my search page is correct, I think it's my results page thats giving me issues.  When I view my search page in firefox and type in a keyword in the text field, when the results page loads all I get is the field names of DB table (id,layouts,desription,key_words) instead of the actual data...??
    On my search page in the action box I have my results page "search_results.php". In the method box I have "GET".  On my "search_ruselts.php" page I created a recordset, selected all columns, and filtered "key_words". (im not sure if I filtered correctly) I placed this in a dynamic table. Where did I go wrong?
    this is my code if it helps any
    search page:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="get" action="search_results.php">
      <label for="textfield"></label>
      <input type="text" name="textfield" id="textfield" />
      <input type="submit" name="button" id="button" value="Submit" />
    </form>
    </body>
    </html>
    results page:
    <?php require_once('Connections/test_db.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_GET['pageNum_Recordset1'])) {
      $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
    $colname_Recordset1 = "-1";
    if (isset($_GET['key_words'])) {
      $colname_Recordset1 = $_GET['key_words'];
    mysql_select_db($database_test_db, $test_db);
    $query_Recordset1 = sprintf("SELECT * FROM images2 WHERE key_words = %s ORDER BY id DESC", GetSQLValueString($colname_Recordset1, "text"));
    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $test_db) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    if (isset($_GET['totalRows_Recordset1'])) {
      $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
    } else {
      $all_Recordset1 = mysql_query($query_Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
    $colname_Recordset2 = "-1";
    if (isset($_GET['id'])) {
      $colname_Recordset2 = $_GET['id'];
    mysql_select_db($database_test_db, $test_db);
    $query_Recordset2 = sprintf("SELECT * FROM images2 WHERE id = %s ORDER BY id DESC", GetSQLValueString($colname_Recordset2, "int"));
    $Recordset2 = mysql_query($query_Recordset2, $test_db) or die(mysql_error());
    $row_Recordset2 = mysql_fetch_assoc($Recordset2);
    $totalRows_Recordset2 = mysql_num_rows($Recordset2);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <table cellpadding="4" cellspacing="4">
      <tr>
        <td>id</td>
        <td>Layouts</td>
        <td>Descriptions</td>
        <td>key_words</td>
      </tr>
      <?php do { ?>
        <tr>
          <td><?php echo $row_Recordset1['id']; ?></td>
          <td><?php echo $row_Recordset1['Layouts']; ?></td>
          <td><?php echo $row_Recordset1['Descriptions']; ?></td>
          <td><?php echo $row_Recordset1['key_words']; ?></td>
        </tr>
        <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
    </table>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    mysql_free_result($Recordset2);
    ?>

  • How to create Pro grammatically Search Form ?

    Version 11.1.1.3.0
    HI i have a requirement where i cant use the search panel/Af:guery panel or View criteria to create the Search form,
    I want simple search on 3 fields and result shld dispaly in table.
    How can i do that??
    Thanks for help

    Two things:
    1. I don't know why you need to have the bean populate the list box -- is it based on other values in the form, requiring a runtime filter? "data" belongs in databases.
    If so, I would recommend looking up Cascading List boxes (Shay has a youtube channel with that) and I have a video on that, too.
    Secondly, you can have list box on the form that will show the "readable" value to the user that they can select. I have a video on that -- possibly the first video I mentioned, but this one may help too.
    http://www.youtube.com/watch?v=ytpLTC5HdvA&feature=plcp
    2. To create a view criteria programatically:
    In the application module, go to the java tab and create an appmoduleimple class. Create a method that manipulates the view criteria and executes the view object. Then expose that on the application module. On the data control, drag and drop the method onto your form. Choose parameter form.
    A form should be created that has the input and button.
    3. On the data control, click on the method and under it, select parameter. drag that onto the form. Select listbox when it asks what kind of control you want to create. Then it will display the listbox gui to connect the database table. This will create a listbox on the form that users can then select. You can manipulate the view object (also using view critieria) behind the listbox to filter data based on some value on the form.
    I am writing from memory here, so I might have skipped a step.
    This may help also: Re: How to filter the list of data
    Edited by: Stuart Fleming on Sep 17, 2012 12:04 PM

  • Question regarding how to use XHTML format in Form Builder to generate PDF

    Hi,
    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can some help me?

    Hi,
    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can some help me?

  • Question regarding how to use XHTML format in Form

    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can someone help me?

    look up for "Using formatters" in the FB help.
    Essentially you'll instantiate a format, NumberFormatter for
    numbers for example, and set it's properties like e.g. showing a
    thousand separator and then one some event of the TextInput --
    valueCommit for example -- you'll do something like:
    ti.text = nf.format(ti.text)
    this is would also give you opportunity to validate user
    input using the same formatter and valid event.
    ATTA

  • How to activate formatted search

    Hi,
    I want to activate a formatted search when I open a form.
    Is that possible?
    Thanks
    Fabio

    Fi Fabio,
    ->> IF you assign the FMS in UDF on Document.
    ->> Auto Refresh of any field(for ex. AutoRefresh of Customer/Vendor Code or DocDate ).
    -> Assign the Refresh Regularly.
    Ex.
    1. Goto the UDF and Clcik ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHANGES.
    5. Select Customer/Vendor Code or DocDate
    6. Check the
    Refresh Regularly

  • How to Fetch the Row value in SBO Formatted search

    Hi Experts,
    I have created a Sales order, in which i  have 4 UDF Fields(A,B,C,D) in the following:
    Example values:
    A  B  C  D 
    2   2   4  4
    3   2   6  10
    C=A*B
    D=1st value of D + 2nd col value of C
    i have written query for C, but how to write the Formatted search Query for generation of D values. plz reply as soon as possible.

    Magesh,
    I quite understand what you are trying to do.   If you look at the example below I added a third row to show how you want the D to be a running total of column C. RIGHT !!
    A B C D
    2 2 4 4
    3 2 6 10
    <b>4 2 8 18</b>
    Honestly, it is not going to be simple as you do not have a way in SBO to access a particular column from a row.  When you say $[$38.U_C] it refers to the context row OR the row which has the highlight OR the row which has the curson on it.
    It is not possible to say $[$38.U_C from row 2]  JUST  NOT POSSIBLE ...
    You have to write a tricky code by using a temp table referencing the value of column C.  Also you have to keep track if Rows gets deleted and a new row added. 
    I will test a sample code and will come back.
    Suda

  • Formatted search values

    Hello experts
    How can I get access to formated search form?
    How to return its marix values (it returns 3 values)? I can choose forms uniqal ID, but how can I get a specific row from it?
    Or how can I display the list of indexes after puttin "*" in the column? what conditions must column have?

    Thanks for your reply.
    1. Well I think I could just make an Matrix object (its an item of formatted search form) and return its rows, am I right?
    2. Could you explain me how to display list of indexes after putting * and tab in a matrix cell (I have no CFL)?  I know it is possible but how should I bind column or maybe do sth else to gain this functionality?

  • Re-initializing search form

    I have a page that consists of several regions. One region is a form that is used as a search form. You can type in an order number, hit submit, and it takes you to a new page displaying the details for that order. When the back button is pressed, the user wants that search form cleared out, but I can't seem to get it to work. Can someone help me figure out how to clear out the search form when returning from another page.
    Thanks much in advance.

    This question should be posted on the Products > Portal > Search forum.
    When you say hit the back button, do you mean the back button on your browser? If so, its the browser that causes this behaviour not the search form in particular.

  • Problem with activation of Formatted Searches

    There seems to be an error in the activation of formatted searches in SAP B1.
    The following is an example to demonstrate the real situation with a minimum of complexity.
    1. We have defined 2 user defined fields, U_trigger and U_target, in the title area of documents. Both are defined as alphanumeric fields with standard length 10 and some predefined values.
    2. For sales orders we have defined for UDF 'target' that a formatted search 'getTriggerValue' is activated on changes of UDF 'trigger'.
    3. The formatted search 'getTriggerValue' reads the value of UDF 'trigger' and writes it to UDF 'target':
    DECLARE @triggerValue AS nvarchar(10)
    SET @triggerValue = $[ORDR.U_trigger]
    SELECT @triggerValue
    When we add a new document to the database, i.e. the document is in "button-mode" = 'add', there are no problems with the activation of the FS on field 'target' when the value of field 'trigger' is changed!
    After a document is already written to the database and is later displayed on the screen again, the document is in "button-mode" = 'OK'. In this situation the FS on field 'target' IS NOT ACTIVATED when the value of field 'trigger' is changed, i.e. the value of 'trigger' is not copied to 'target'.
    After this first change the document is now in "button-mode" = 'update'. If we now change the value of field 'trigger' a second time the FS on field 'target' is activated an the value is copied from 'trigger' to 'target'.
    If we define the FS of field 'target' with option 'Refresh Regularly' the FS is activated after the first change of field 'trigger' as expected.
    But we CAN NOT USE THIS OPTION AS A STANDARD SOLUTION for our problem, since some fields and their FS can not work with this option and need the standard option 'Display Saved Values' set. Otherwise some fields yield wrong values, since they are working not only with constant predefined values as in the simple example above, but with dates which are set by GETDATE() in the FS, e.g.
    Is this behaviour a bug of SAP (FS is not activated even if the value of the refresh field is changed)?
    If not, what is the idea behind this behaviour?
    And how can I get around this behaviour?
    Thank you for your support!
    Frank Romeni

    Hello Suda!
    Many thanks for your answer!
    Perhaps my explanations are a bit in confusion.
    The example in my question is just to demonstrate the behaviour of the formatted search with option 'Display Saved Values' set, i.e. in a document that is already saved to the database, only after the second change the formatted search is activated.
    I am aware that with the simple formatted search that I have shown as an example everything works fine with the option 'Refresh Regularly'.
    But what is the meaning to activate the formatted search only after the second change when option 'Display Saved Values' is set?
    The reason why we can't use option 'Refresh Regularly' is that in our real application not only constant values are copied from 'trigger' to 'target'.
    Let me give you an example which approaches the real situation more than the first example:
    DECLARE @trigger AS nvarchar(20)
    SET @trigger = $[ORDR.U_trigger]  -- U_trigger / UDF 'trigger'
    DECLARE @save AS datetime
    SET @save = $[ORDR.U_date]        -- U_date / UDF 'date'; save current date
    IF @trigger = 'getDate'
      SELECT GETDATE()
    ELSE IF @trigger = 'getDateConst'
      SELECT '01.01.2008'
    ELSE IF ...
    ELSE
      SELECT @save                    -- no value in @trigger to change date ==> reset
    Option 'Display Saved Values' set: formatted search is activated only after the second change of value of UDF 'trigger'. This is not acceptable!
    Option 'Refresh Regularly' set: Suppose the 'trigger' is set to 'getDate'. The actual date, e.g. 25.06.08, is displayed in UDF 'date'. The document is saved to database. When the document is fetched again on the next day, the formatted search is activated immediately without the change of any values, i.e. 'trigger' still is set to 'getDate'. This is evaluated in the formatted search and the function GETDATE() is called and the now actual date, 26.06.08, is written to UDF 'date'. This is wrong!
    I hope that the new example shows why we can't use option 'Refresh Regularly'!
    We need no regularly refreshed value of UDF 'date', we need an activation of the formatted search only when the value of UDF 'trigger' changes. But why is it activated only after the second change when 'Display Saved Values' is set?
    Thank you for further support!
    Frank Romeni

  • Formatted Search and Item Events

    Hi,
      I am having a huge problem with using Formatted Search and Add-Ons.
    On the Sales Order Form I have a Formatted search Setup on the Customer Reference Number, it is set to Auto-Refresh when the CardCode changes.  This is the only Formatted search on this form and it works fine.
    However, when I run my Add-On, and enter an Item Code it takes about 30 seconds to display the Item Description. In tracing my Add-On it appears to call the Item Event et_GOT_FOCUS on the Item Code Column I just entered over 50 times.  I don't use other events, but for testing I did turn on all events and the only other event it occured with was et_LOST_FOCUS.
    If I turn off my Add-On or turn off Auto Refresh on the Formatted search everything runs as it should.
    I figure the Auto Refresh of the Formatted search has something to do with this, but I need to have this turned on.  Another thing is that it only seems to call this event when Before Action = false, It does not seem to be called on Before Action = True. 
    Can I disable the Formatted search temporarily from within my add-on or is there something else I need to do to keep this from happening.
    Thanks for Any Help
    Paul

    Hi Alfredo,
      Thanks for the suggestion, that sounds like it might be what I am looking for. But I am confused on trying to visualize how this would work. Do I need to duplicate the entire logic that Business One already does or are there some functions in the DI/UI that I can call that does the functions.  Since I am doing this from a System(Sales Order) not User Defined Form, does that change anything.  I did see the FormattedSearches Object to add a Formatted Search through the DI, but that seems like it will just create the Object and not help me execute it from my Add On.
    Is there some code snipits you could provide or get me going in the right direction on how to implement the formatted searches from within my Add-On. 
    Thanks Again,
    Paul

  • Creating a Better Search Form

    Hi,
    I'm trying to figure out how to create a dynamic search form
    using Coldfusion 8.
    Right now if I enter multiple words in my search field the
    results omit certain records. For example, if I put "toy blue" in
    the search field it will return results that only have "TOY BLUE"
    together and omits any records that only have "TOY" or only have
    "Blue" in the column being searched.
    Is there a way to add the following abilities to my basic
    search code located at the bottom of my post:
    - Search multiple words that are entered in the criteria
    input field.
    - The words can be separated by commas, spaces, or the word
    "and".
    - Have it so you can search multiple word phrases by using
    quotes.
    <!--- Search Form--->
    <form name="myForm" method="post"
    action="results.cfm">
    <p>
    <input name="criteria" type="text" id="criteria">
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <!--- Results Page --->
    <cfquery name="qSearch" datasource="myDatabase"
    dbtype="ODBC">
    SELECT itemID, itemName
    FROM myTable
    WHERE 1 = 1
    <cfif IsDefined("form.criteria") AND
    Len(Trim(form.criteria))>
    and (itemName LIKE '%#form.criteria#%' or itemDescription
    LIKE '%#form.criteria#%')
    </cfif>
    </cfquery>
    <p><b>Results:</b></p>
    <cfoutput query="qSearch">
    <p>#itemid# - #itemName#</p>
    </cfoutput>
    <!--------->
    Any help would be greatly appreciated.
    Thanks
    -C

    This is the relevent sql
    and (itemName LIKE '%#form.criteria#%' or itemDescription
    LIKE '%#form.criteria#%')
    substituting the variable, it looks like this
    and (itemName LIKE '%TOY BLUE%' or itemDescription LIKE '%TOY
    BLUE%')
    You have to treat form.criteria as a list, and loop through
    it.

  • Reg - Search Form for a VO with group by clause

    Hi,
    I have a Bar graph that displays data based on the Query below.
    SELECT STATUS.STATUS_ID AS STATUSID,STATUS.STATUS,COUNT(SR.SERVICEREQUEST_ID) AS SRCOUNT
    FROM SERVICE_REQUEST SR ,SERVICEREQUESTSTATUS STATUS
    WHERE SR.STATUS_ID = STATUS.STATUS_ID
    GROUP BY STATUS.STATUS_ID,STATUS.STATUS,SR.STATUS_ID
    It displays the count of SRs against a particular status.
    Now I need to add a search form to this graph with customer and date range.
    So we need to add the line below to the where clause.
    "SR.CUSTOMER_ID = :customerId AND SR.REQUESTED_ON BETWEEN :fromDate and :toDate"
    But the columns SR.CUSTOMER_ID, SR.REQUESTED_ON also need to be added to the select clause to create the View criteria for search panel.
    The two columns should also need to be added to the group by clause if we are to add them in the select clause.
    This would not produce the expected results.
    How do I create a search form with the criterias applied only at the where clause.Please help.
    With Regards,
    Guna

    The [url http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html]ViewObjectImpl has methods for doing this programmatically (setQuery, defineNamedWhereClauseParam, setNamedWhereClauseParam) that you can use to manipulate the query, the bind variables expected, and the values for the binds.
    John

Maybe you are looking for