Setting data values on insert with a form

I have a form I am using to insert records into a table, and I want to be able to set the value for a certain column ( in this case status) to be dependent on the a value that another column is set to. The specific case here is I have an application users table so if I get a request for a user asking for lookup privilege I want to status field to be set to approved other requests should have status set to pending.
I have tried adding a process and doing an update to the status based on the value of the role, but it seems that the role is null when it gets to the process. I am merely referencing the column of the form. In this case :P7_ROLE.
Any help would be appreciated.
John

For anyone who looked at this, I found my problem. The process I created was at the wrong sequence and was executed after the page cache was cleared.
Newbie mistake:)

Similar Messages

  • How to insert the Formatted date value and insert into the database

    Hi All,
    I am having requirement of inserting the date value in to the datbase. I'm already getting the value from file as MM-DD-YYYY. Getting exception while transforming the values through the transform activity. I'm using format fate function but it is inserting null value in to the database.
    Any help from anyone would bve appreciated.
    Thanks,
    CH

    Hi,
    your input date format is fixed right? So, in the transform you can split each your date, which is in 'MM-DD-YYYY' format ... extract day, month, year.
    After that ... just put these values in order acording to the format of 'xsd:date' data type which is '[-]CCYY-MM-DDZ'.
    XPath function 'xp20:format-dateTime()' works only with 'xsd:dateTime' data type, which has format '[-]CCYY-MM-DDThh:mm:ssZ'.
    So, in your case it could be:
    <xsl:variable name="day" select="substring($inputDate,4,2)"/>
    <xsl:variable name="month" select="substring($inputDate,1,2)"/>
    <xsl:variable name="day" select="substring($inputDate,7,4)"/>
    <xsl:variable name="outputDate">
    <xsl:value-of select="$year"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="$month"/>
    <xsl:text>-</xsl:text>
    <xsl:value-of select="$day"/>
    </xsl:variable>
    Regards,
    Martin.

  • Set Default Values in Listbox with Dialog Programming

    Hi all,
    I am stuck with a problem i.e  I am working with Dialog Programming Screen
    where i have to set default values in some n numbers of Listbox which i have created on Screen.
    This default value is needed to be fetched from database table.
    I am using single table. Hence no confusion that i have to first fetch data from 1st listbox then corresponding data is fetched into second & so on ..NO NO This is not required.
    Simple one screen which will update a table in database, where  some fields on the screen needs to be default set as per tables domain default values set while table creation.
    Please help me out in this.
    Thanks & Regards,
    Sandhya.

    Please search SDN, before you post a new forum from next time... any ways just follow the below code..
    u need to use the FM 'VRM_SET_VALUES' to implement list box in module pool. Check the below code. u have to write this code in PBO..
    if c = 0.
    select land1 landx from t005t into table wi_country.
    sort wi_country by land1.
    delete adjacent duplicates from wi_country comparing all fields.
    loop at wi_country.
    wa_ctry-key = wi_country-land1.
    wa_ctry-text = wi_country-landx .
    append wa_ctry to wi_ctry.
    endloop.
    call function 'VRM_SET_VALUES'
    exporting
    id = 'ZCUST_MASTER1-COUNTRY'
    values = wi_ctry
    exceptions
    id_illegal_name = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    c = 1.
    endif.
    Hope this helps u,
    Regards,
    Rajesh

  • Wrong date value is inserting

    Hi All!
    When I call the procedure insertDate that inserting the date it inserts wrong value, sometimes the date is more than a year off, otherwise the value of new Timestamp(date.getTime()) is giving the right date at the moment of setting the parameter.
    Why is it happening and how to fix that?
    Here is the source:
    private static Date formatDate(int year, int mon, int mday, int hour, int min, int sec) {
    Date date = null;
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String textDate = (1900 + year) + "-" + mon + "-" + mday + " " + hour + ":" + min + ":" + sec;
    System.out.println(textDate);
    try {
    date = format.parse(textDate);
    System.out.println(date.toString());
    } catch (ParseException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    return date;
    Date date = formatDate(111, 6, 29, 12, 59, 45);
    CallableStatement cs = connection.prepareCall("{ call insertDate(?)}");
    cs.the pasetTimestamp(1, new Timestamp(date.getTime()));
    Thank you!
    Regards,
    Astrid

    I'm using MySQL.
    If I store Timestamp mostly I got '0000-00-00 00:00:00' and sometimes something like '2013-11-08 15:09:46'.
    I've made changes in order to insert not Timestamp directly, but string. And it works properly by inserting exact date and time - '2011-07-01 08:29:33'.
    My procedure now looks like
    CREATE PROCEDURE `saveQueryResult`(date1 VARCHAR(50))
    BEGIN
         DECLARE d DATETIME;
         SET d = TIMESTAMP(date1);
         INSERT INTO values_ (submit_date)
         VALUES (d);
    END$$
    DELIMITER ;

  • Setting Date value in stored procedure via jdbc

    I have a stored procedure where one of the parameters is a date value. I am trying to invoke this through jdbc with a CallableStatement. I am creating a java.sql.Date object and passing that to setDate() on the CallableStatement. When I execute the statement, Oracle always uses 00:00 for the time (hh:mm). Why can't Oracle interpret a java.sql.Date and get both the date and time values? Do I need to somehow call the Oracle function to_date(stringvalue, "yyyy-mm-dd hh:mm") to create an Oracle date value and if so how would I execute that from java through jdbc? My guess is that I can't. Any thoughts would be appreciated.

    ok this is the package header:
    create or replace package get_outvalue_test is
    type rec is record (time archive.time%type,
    value archive%type);
    type value_tab is table of rec index by binary_integer;
    procedure get_value(p_returnvalue IN OUT value_tab);
    end;
    package body :
    create or replace package body get_outvalue_test is
    procedure get_value(p_returnvalue IN OUT value_tab)
    is
    ii number;
    cursor valselect is
    select time,value from archive where u_id=5666
    and time=:block.date_item ; -- this is the return date from LOV
    begin
    open valselect;
    ii:=1
    loop
    fetch valselect into
    p_returnvalue(ii).time;
    p_returnvalue(ii).value;
    exite when valselect %notfound;
    ii:=ii+1;
    end loop;
    end;
    end;
    this is the error when i compile the package body :
    MIssing IN or OUT parameter at index
    i hope itis cleare and easy .

  • How to set date value in hidden item

    I have a form which has an date item, P1_MTIME , if I use data picker and an procedure (After header)to define its default , as
    begin
    :P1_MTIME := to_char(sysdate,'DD-MON-RR HH24:MI');
    end;
    Everything works fine, but when I change P1_MTIME to hidden, I can only get its value set to date, not hour and minutes, such as 2006-06-23 00:00, what I did wrong?

    Why not just have a hidden item with the ID so that when you create (insert) it is null and you insert sysdate and when you are editing an existing value and hence have the ID you update. This logic is easy to place in a page process (when the page is submitted)

  • Use session state values to set column value during insert/update

    I am building an APEX 4.2 application that uses the canned Data Loading control to upload csv data to a table.  I have modified the 'Select Data Source' page of the workflow and it now contains three LOV's that the user selects values from.  The selected values are stored in Session State.  As I'm new to APEX, I do not know how to reference Session State objects in the context of the Data Loading workflow so that the appropriate columns are set with the correct values.  My assumption is that the columns that are apart of the insert statement reside in a collection somewhere.  I just don't know how to loop through the collection, determine the correct column, and then set that column's value equal to the corresponding LOV value in Session State.

    Scott,
    This is in version 2.2.1 and there are no caching features available.
    The application does require login.
    I'm playing around with the APP_UNIQUE_PAGE_ID right now but I am finding that even in the builder if I edit the attributes of a report column and then try to edit another column it will bring up the last column I edited. Even if I use the record navigation buttons next to the Apply Changes button it will keep bringing me the same page over and over unless I constantly refresh the pages.
    Greg

  • Setting default value to columns on tabular form is not working.

    Hi,
    I created a tabular form and i want to set some default values to columns based on the values in page items.
    so i set the page item to column value in tabular form attributes by selecting the Default type as PLSQL Expression & Function DEFAULT value &P24_ISSUE_ID. it worked fine but
    in the similar way i tried for the another column by selecting the default type as pl/sql expression & function and default value &P24_CASE_NAME.
    but it throwing an error for this like failed to parse SQL query:    ORA-00904: "C254DB": invalid identifier
    i don't understand where i gone wrong even i checked for the data types of the columns, everything is fine.
    so please help me out of this problem.

    Tulasi 1243 wrote:
    for the first column
    i selected
    DEFAULT TYPE as PL/SQL Expression & FUNCTION
    Default as *&P24_ISSUE_ID.* This is a number data type column
    2nd column
    Default Type as PL/SQL Expression & Function
    Default as *&P24_CASE_NAME.* This is Varchar2 data type column.The appropriate options for a default value from a page item are Item (application or page item name) for Default Type and the item name ( P24_ISSUE_ID, P24_CASE_NAME etc) for Default.
    *&P24_ISSUE_ID.* is not a "PL/SQL Expression or Function".
    but it throwing an error for this like failed to parse SQL query: ORA-00904: "C254DB": invalid identifierWhat you are doing results in the APEX engine substituting the P24_CASE_NAME value "C254DB" into the default value and then trying to evaluate this string as a piece of PL/SQL. Outside of a block in which it is defined as a variable, constant or function "C254DB" is not a valid PL/SQL expression.

  • How to set multple values in cluster with local variable?

    Hello all,
    Ok, I've made my way through Labview for everyone, and have some basic concepts down. I can see with a cluster, if acting directly upon it, you can unbundle, change values, rebundle, etc.
    I'm trying something a bit more complex...and just not sure how to get started on this.
    I have a drop down menu ring. I have set this up as a typedef, with 4 values.  I have used this typedef 7 times, plus some LED bools, in a cluster. I have made this cluster a typedef.
    So, in my main vi I"m starting to design, I've set up an example posted here....and in it, I have two instantiations of the cluster typedef, Left Selector and Right Selector.
    I have dropped into this vi, a copy of the menu ring typedef (same typedef as in the clusters, same values)....called reset all tubes.
    I'm trying now, to figure out how, with an event on the change of value for 'reset all tubes'....that I can start with the left selector, and change all the tubes (these are the menu ring selector)  to the same value as what has been selected with the 'reset all tubes' menu ring.
    I've created a local variable for the left selector. It is set to read values. (I'll be doing the same with the right one too, but just starting with the left).
    In examples I've seen where directly accessing a cluster, you could unbundle the cluster...loop through and change the values...maybe pull out all of the 'tubes' into an array and move through that to update the values.  And when you bundle or unbundle the cluster...you can see the values, etc, when you stretch them out on the block diagram.
    With the local variable..I can't see to 'stretch' it out like I was expecting..so I can access the values for the 'tubes'...and set them all to the value of the 'reset all tubes' ring menu value.
    Can someone put me on the path on the best way to do this....or is there a structure of component I'm missing here ?  Am I on the right track to begin with here?
    This would seem pretty basic to me, but I'm just missing something here on how to start...
    Thank you in advance,
    cayenne
    Solved!
    Go to Solution.
    Attachments:
    example_select_dropdown.ctl ‏5 KB
    public_selector_cluster.ctl ‏6 KB
    laptop_test_public.vi ‏12 KB

    nathand wrote:
    You can't do this with a for loop the way the cluster is structured, but why make it so complicated?  Just bundle the new value into the cluster as shown below:
    If you do want to use a for loop, consider restructuring your cluster.  Group the ring and a boolean into a cluster, then drop 7 of those into the selector cluster.  Then you can use "cluster to array" and "array to cluster" since all elements in the outer cluster will be of the same type.
    Also, be careful using rings as type definitions.  You probably want to use an enumeration instead.  The items in a ring do not update when you update the type definition because they're considered to be cosmetic; the items in an enumeration type definition do update, because the items in an enumeration are considered part of the data type.
    Oh my goodness!!
    What was MUCH easier than I was trying to make it!!
    I was attempting to do this reset, in an incremental fashion, as that later, I'm going to need to change values in this cluster by individual elements....and was using this as a way to try to understand how to iterate between cluster elements, and change the values of each one.
    This solution works much better for this 'reset' all solution.
    One question on this....with regard to the enum vs the ring menu.
    I was actually going to go with the enum, however, I could not find a way to make it LOOK like the ring menu...with the arrow to the side that a user would know to click to present the menu list of choices.
    I see with the enum, that you can remove the increment/decrement indicator.....and if the user clicks the control, it will indeed pop up a menu of choices...but there is no 'arrow' on that control to indicate to the user that it is a menu choice there.....
    Is there a way to make and enum look like a ring with the "drop down menu" control look?
    Again, thank you !!
    This helps!
    C

  • Setting Date value in File Name while scheduling report to File System

    I am trying to set the file name as %SI_Name% Current Date.extension in Destination section while scheduling a crystal report to File system.
    So in Use Specific Name section i have added %SI_NAME% %SI_STARTTIME%.%EXT%.
    Schedule works fine for me and I get the document in the file location with name  'Title 2009-06-26-12-53-17.pdf".
    But I dont want time to be printed in the title, so the title should be "Title 2009-06-26.pdf". How i can achieve this.
    -Raghu

    Is there any way to achieve this?
    -Raghu
    Edited by: Raghavendra Barekere on Jul 5, 2009 3:09 PM

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Data limitation for inserts with JDBC?

    I'm having problems with inserting data using JDBC that came with
    Oracle 8.1.5. I'm inserting text into a long field. It works
    fine until i approach 99K+. The error i'm receiving is
    "unimplemented or unreasonable conversion requested". If i
    remove some of the text it works fine. Its not the content thats
    that causes the problem, but the size. I just inserted a string
    of a's until it hit some limit. Is this a known limit? Please
    help.
    Text added: (99K+ of a's)
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    null

    HI Nilesh
    This error comes when Xi server is unable to access the Data base server .Please check if port 1433 is open from your Xi server .
    Format for Connection string
    jdbc:microsoft:sqlserver:,<database path>:1433;DatabaseName=,<dbname>;AuthenticationMethod=type2
    Similar problem with solution
    Socket Error
    Error in JDBC adapter
    Cheers..
    Vasu
    <u>** Reward Points if found useful **</u>

  • How do you import multiple sets of tab delimited text into your form?

    Is there an easy way to bring in form data from a text file of data values(tab delimited) with multiple instances of each variable?   In my current project, I would like to bring name, address, phone, etc data from the text file for a couple hundred people into a PDF form which I create and format to my given specs.  I know I can import the text and select which instance of the variable I want to populate the similarly named fields, but I was wondering if I could appropriately name or create the various fields in the form so that it would auto populate each subsequent instance of the variables with the next line of data?.  In this case, I want to end up with a nicely formatted address book.
    Thanks!

    It is possible but not just a simple import of data.
    Each form field in the multiple page PDF would need a unique name not repeated on another page of the PDF. Fortunately the Acrobat form standard includes the "template" object and this object can be spawned or used to add a new page with the form fields automatically renamed with a prefix string of the page number and template added to each form field on the new page. So if one were to import a row from your tab delimited file into the template, one could then spawn a new page from the template with the data and rename the fields so there would be no conflict of like named fields.
    A Lesson in Templates for Adobe Acrobat by Dave Wraight
    With newer versions of Acrobat there is a mail merge feature.
    Create PDFs from Word mail merges

  • Loss style when overriding the function 'set data' for a TileList

    Hi!
    In a TileList, I set the itemRenderer for a components from
    where I override the function set data like in this example:
    but, by doing this, I'm loosing all the built-in CSS
    behavior. The onMouseOver effect the change the backgroundColor and
    the hand pointer. I try to set it programmatically but without
    success.
    An idea?
    Thank you

    "FlexBin" <[email protected]> wrote in
    message
    news:gdaj4r$noj$[email protected]..
    > Hi!
    >
    > In a TileList, I set the itemRenderer for a components
    from where I
    > override
    > the function set data like in this example:
    >
    > but, by doing this, I'm loosing all the built-in CSS
    behavior. The
    > onMouseOver
    > effect the change the backgroundColor and the hand
    pointer. I try to set
    > it
    > programmatically but without success.
    >
    > An idea?
    >
    > Thank you
    >
    > public override function set data(value:Object):void
    > {
    > var xml:XML = new XML(value);
    >
    > if(this.backgroundIconName != null &&
    > this.ico != null &&
    > this.labelText != null) {
    >
    > if(xml.backgroundIconName != "") {
    >
    > this.backgroundIconName.source = "assets/" +
    xml.backgroundIconName;
    > }
    >
    > this.backgroundIconName.visible =
    (xml.backgroundIconName != "");
    >
    > this.ico.source = "assets/" + xml.iconName;
    > this.ico.width = Number(xml.width);
    > this.ico.height = Number(xml.height);
    >
    > this.labelText.text =
    resourceManager.getString('myResources',
    > xml.label);
    > }
    >
    > if(xml.@available == 'false')
    > {
    > this.enabled = false;
    > }
    > }
    There are examples of how to properly implement this kind of
    functionality
    in the itemRenderers here:
    http://flexdiary.blogspot.com/2008/09/groupingcollection-example-featuring.html
    http://flexdiary.blogspot.com/2008/09/extended-datagrid-with-stylefunction.html

  • To set a value in matrix cell which is linked

    In sales order if I enter  form no of TAX TAB as "form c" , each cell of the TAX Code column of the matrix of contents tab should be set the value as "CST". I have tried to set the value, but it is showing "Form item not editable". I have tried to make the cell as editable but still the error message is coming and it is not setting the defined value. How can this be solved?
    Thankx in advance

    Hi Priya Manoj
    Some notes you can find on this [Thread: Set Value in Itemcode in Purchase Order Form|Set Value in Itemcode in Purchase Order Form;.
    There are I has posted some examples in vbcode.
    Hope the notes can help you.
    Regards
    Sierdna S.
    Edited by: Sierdna S on Oct 22, 2008 9:45 AM

Maybe you are looking for

  • I can't uninstall; tried from control panel and from the uninstaller help file.

    all explained above. nothing will remove this program from my computer...windows 8.1

  • Is Acrobat 7.0 Standard supported on Windows 8.1?

    Will I be able to install Adobe Acrobat 7.0 on my new laptop running Windows 8.1 or will I have issues with functionality?  Thanks.

  • SOAP Receiver multipart

    HI. I defined as external definition a webservice. My problem is that when i select the response method in message mapping, i'm getting a message completely different than in SXI_MONITOR. First of all, i'm using a RPC style webservice definition. In

  • Problems printing a grid

    Hi, I'm trying to print a 1mm X 1mm grid in a paper. I'm using Java2D to print the lines. This is the code snippet which draws the lines:      /** Pixels/millimeter ratio */      public final static double PRINT_PIXELS_PER_MILLIMETER = (72.00 / 25.40

  • Get-SCSMWorkflow ManagementPackObjectTemplate was not found

    When running the powershell command Get-SCSMWorkflow it list out a few of the Workflows and than gives the following error: Get-SCSMWorkflow : An object of class ManagementPackObjectTemplate with ID 7a68dba0-7999-43e2-1268-bf04bd06ed4c was not found.