Validating if a field has changed value

I have a custom field: Oportunity Number. This number will be generated for new Opts. by a web service.
I am trying to validate if a user tries do change or delete this number with editing.
I am using:
FieldValue('<nNmero_Oport_ITAG>') = PRE('<nNmero_Oport_ITAG>')
and it seems to be working fine for changes. OTH if the user just blanks out the field, above expression is not catching it...
I´d appreciate any help.
Txs.
Antonio

Just a guess. You can also try
FieldValue('<nNmero_Oport_ITAG>') = PRE('<nNmero_Oport_ITAG>')
OR [<nNmero_Oport_ITAG>] IS NOT NULL
Thanks VK

Similar Messages

  • Serv. Desk: Action: send an email only when a value in a field has changed

    Hello,
    In Soution Manager 4.0, Sevice Desk, I would like to create an action which creates an email only when a value of a certain field has changed.
    - only in change mode relevant
    - only when a value of one field has changed (e.g. Message Processort has changed from Buss. Partner 4 to 5. Than a mail should be sent to BP 5).
    - it should only send this kind of email when the field value has changed in change mode. In other words: it should not sent the email e.g. when the status has changed.
    I tried all kinds of things but I do not know on how to define the COnditions for an Action, so I can compare e.g.
    if <old value> <> <new value>
    Any ideas or experience on how to implement this without major modifications ?
    Thanks
    Christian

    Hi Christian,
    check out my question on SDN.
    Email on Status Change
    it has details on how to send an email when the status changes. I believe you are going to have to do something like this for each of the fields you want to create an Action Starting Condition for.
    regards,
    Jason

  • Dithering buttons based off of whether or not a choice field has a value

    Hi,
    I am trying to dither out a button until a choice field has a value in it. I have been noticing that users have been submitting the form without selecting any of the options in the choice field (has about 40 choices).
    I would make that field required, but it would interfere with different views of the form that do not have that section attached to them.
    I have tried dithering the button if the value or if the field itself is either blank or not present, but it does not appear to be working.
    I was thinking that I may need to create a single line of text field that populates if a value is present, however, was hoping there would be an easy way to do this.
    Any help would be greatly appreciated!
    Thanks (happy holidays),
    Greg
    Greg Baker

    Hi  Greg,
    Thank you for your posting!
    For achieving your demand , you can use JavaScript as following:
    Create a field CurrentView to record the current view.
    Add set a field’s value rule on switch view button, such as when we click switch view 1 button, the rule will set the CurrentView  field to 1.
    Add  below JavaScript:
    function validateDropDown() {
    var curView =document.getElementById(“CurrentView”);
    if(curView==1)
    var ddl = document.getElementById("DropdownListID");
    if (ddl.selectedIndex == 0 || ddl.options[ddl.selectedIndex].value == "")
    alert("Please select an option! ");
    return false ;
    else { return true ;}
    </script>
    Hope this helps,
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Identify when a user has change value in USEREXIT_CHECK_VBAP before saving

    I originally posted and closed this question, but I am still struggling with the code.
    The req is now to also update the value of VBAP-LPRIO, so I now have to use the Exit : USEREXIT_CHECK_VBAP.
    The issue is that my solution must take into account when a user manually overwrites a value and not replace it with a value determined in the user exit.
    My problem is that the user might do the following
    1 - Create a sales order and enter a new item line, press enter
    2 - The user exit is triggered, and I check that XVBAP-UPDKZ = I  (user add a new line)
    3 - The user-exit determines the new value and populates the field
    4- the user then click on the item line, and then manually changes the value of VBAP-LPRIO
    5- The user-exit is triggered again, and because  XVBAP-UPDKZ = I , my code is triggered and updates the field.
    What I want is to identify that a user has manually changed the value and not overwritte the value.
    1 - I have check YVBAP and it is blank, as the user has not saved the sales order.
    2- The values of VBAP and XVBAP are the same..
    3 - I cannot re-read the database (KNVV) table as the user could have populate the value with the same value.
    What I need is how to identify when a user has made a change to a field before they save the sales item, as YVBAP is never filled.
    Previous post----
    Hello,
    I am writing a bit of code that will overwrite the payment terms in a sales order item based on a number of factors. (ship-to, incoterms, document type, etc)
    I am using the following program MV45AFZB at Exit : USEREXIT_CHECK_VBAP. I am using this exit as the users need to see the payment terms after an item has been entered into the sales order and not have the value determined at sales order save.
    I am not using USEREXIT_MOVE_FIELD_TO_VBAP as it is only triggered once at the time of creation and not when I change the document. I need it in USEREXIT_CHECK_VBAP as users could change the incoterms in VA02, so the code must be redetermined.
    My code is working as expected, however, I have a problem when a user enters a sales order item line and then manually changes the payment terms, as my code then is over writes the users values.
    The flow is as follows
    As user creates a sales order
    They populate the sales order header
    They populate material number and qty
    User exit USEREXIT_CHECK_VBAP is triggered and correctly determines the payment terms
    The user then double clicks on the sales order item and decides to overwrite the payment terms.
    My user-exit is retriggered and check to see if XVBAP-UPDKZ = I (insert)
    As it is still an insert, my code triggers.
    I have tried to check YVBAP, but no entry exist as it stills is seen as in insert? What I really need to know that while it is still an insert, the user has change the field value and my code should not over write the users value.

    When do you need to update LPRIO ? When user makes the change at the Payment terms on line item?
    Regards,
    Naimesh Patel

  • Last field has no value in sender flat file.....

    Hi,
    I am doing FCC on sender flat file.
    If the last field in the flat file has no value i.e. say if comma is my fiels seperator ,then the file is lik:
    1,2,3,
    The last node of my XML is not formed and giving me mapping errors....How do I solve dis??
    Plz help
    Edited by: sriparna1 on Oct 20, 2010 12:34 PM

    For comma seperated structures, the missing fiels are ignored.
    Make sure you defined the endseperator.
    Edited by: nagarjuna _s on Oct 20, 2010 12:46 PM

  • How to print blank line on BIP template when the field has no value?

    I have a BIP template like below and all these CHILDREN, NAME, GRAND_CHILDREN, NAME are fields arranaged in the template as a row.Reps can enter values in each of these fields for a max upto 3 rows. The first 2 rows have the values and the last is blank.
    CHILDREN: NAME: GRAND_CHILDREN: NAME:
    Son     John Daughter     Smith
    Daughter Laura Son      Kevin
    In the third row since the fields have no values, the report print blank rows, but I want to delete that blank row and show only the rows(first 2 rows) that have values for the fields.
    Does any one know how to get around this? Please help me to resolve this.
    Thanks in advance,
    RV

    Thanks.Here is the sample XML. Fields that refer to are as follows:
    Children: DependentDD1, DependentDD2, DependentDD3
    Name: DependentFF1, DependentFF2, DependentFF3
    Grandchildren: GrandchildDD1, GrandchildDD2, GrandchildDD3
    Name: GrandchildFF1, GrandchildFF2, GrandchildFF3
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ListofIO>
    - <ListOfBipCustomerProfileReport>
    - <Contact>
    <FirstName>ROSCOE</FirstName>
    <LastName>CLOUGH</LastName>
    <LeadContactType />
    <PartyTypeCode>Person</PartyTypeCode>
    <PartyUId>XXXXXXXXX</PartyUId>
    <PersonUId>XXXXXXXXX</PersonUId>
    <PrivacyCode>Opt-Out: All Parties</PrivacyCode>
    <RelationtoHousehold />
    <SocialSecurityNumber>XXXXXXXXX</SocialSecurityNumber>
    <UserType>Prospect</UserType>
    - <ListOfA-FmrCustomerProfile>
    - <A-FmrCustomerProfile>
    <DependentDD1>Son</DependentDD1>
    <DependentDD2>Daughter</DependentDD2>
    <DependentDD3 />
    <DependentFF1>John</DependentFF1>
    <DependentFF2>Laura</DependentFF2>
    <DependentFF3 />
    <GrandchildDD1>Daughter</GrandchildDD1>
    <GrandchildDD2>Son</GrandchildDD2>
    <GrandchildDD3 />
    <GrandchildFF1>Smith</GrandchildFF1>
    <GrandchildFF2>Kevin</GrandchildFF2>
    <GrandchildFF3 />
    </A-FmrCustomerProfile>
    </ListOfA-FmrCustomerProfile>
    </Contact>
    <Login>A482003</Login>
    </ListOfBipCustomerProfileReport>
    </ListofIO>

  • Validation of column fields while entering values in editable ALV

    Hi,
    I am currently working on a ALV,I have to validate the editable field of ALV,while entering values.SO if there is a field Item number,the range should be between M01-M99,and user should not take any value other than the F4 help assigned to the field.Can all this calculation be done using a FM & Not OOPs process for making ALV.
    Please advice.
    Thanks.

    >
    p317980 wrote:
    > REF_TABNAME    LIKE DD03P-TABNAME,
    > Will the field just pick values from the F4 & not any random value entered by user?
    >>yes.
    > if these values entered at runtime need to be saved into a Ztable,will I have to use Classes for defining my ALV?
    >>write some code to check if the entry exists.. if not then update the Ztable..
    >>select single field from table. if sy-subrc eq 0. fine else. update ztable.if.

  • Time character has changed values during excel download.

    Dear friends,
    We are using BI7.00. In one of our report, we use Enterprise portal for reporting, we have the time character in a seperate field. When the output of this report is exported to excel, the value which is getting populated to excel is getting changed.
    For example :- the report is PM report which has malfunction start time in the report as a column, if the value in the report output is 04:20 , the value in excel is 09:50.
    How this is possilble.
    Prior to dowload, when we click the export to excel icon in EP , the message "Problems came up in the following areas during load" - Cell value -> this message is popped up and if you overcome this message, we have difference in values.
    I have searched in this forum and was not able to find any suitable solution.
    Experts help expected.
    Regards,
    M.Magesh

    Experts help on this?
    Regards,
    M.M

  • How to insert row where DB date field has default value.

    APEX 4.1, Oracle 11.2
    I'm trying to insert a row using "javascript:addRow();" where the report query is an SQL Query (Updateable Report).
    1)  Several of the fields are display-only with defaulted values.
    2)  No problem with the VARCHAR2 fields.
    3)  And if RUN_DT is a text field, the insert works.
    4)  But I get errors when trying to make RUN_DT (DD-MON-YYYY) display-only and default it to P63_RUN_DT.  I display P63_RUN_DT so I see it is correct.
    Now, this is not a new question.  See:
    Error inserting sysdate with time in tabular form region  https://forums.oracle.com/thread/2551916  (Not answered)
    Date value in tabular form  https://forums.oracle.com/thread/2478358 (Not answered)
    Help! Unable to set default date value for Tabular form DB date field! https://forums.oracle.com/thread/2473208  (Not answered)
    Default Value Date Picker Field https://forums.oracle.com/thread/2468973  (Not answered)
    Tabular Form Default Value PL/SQL https://forums.oracle.com/thread/2464192  (Not answered)
    Display 1st region invoice date into tabular form invoice date column. https://forums.oracle.com/thread/2458561  (Not answered)
    Default System date and time in Tabular form https://forums.oracle.com/thread/2449615 (Not answered)
    Setting default value of Tabular form item is not working https://forums.oracle.com/thread/2396024 (Not answer)
    apex tabular form https://forums.oracle.com/thread/2337098 (Not answered)
    Various folks recommended using Default PL/SQL and SYSDATE when SYSDATE was the desired default value.  That worked for some and not for others.  I could not get it to work for me.  The errors I receive are "•Column must have a value. (Row 1) " and "ORA-01410: invalid ROWID".   I believe the ROWID error is an example of spurious error cascade caused by the RUN_DT problem.   I believe it will disappear once the RUN_DT problem is solved.
    I will try to replicate on apex.oracle.com
    Thoughts?
    Howard

    Update: At least in my case, it seems the RUN_DT date column cannot be Standard Report Column.  I made it "Display as Text (saves state)".  Standard Report Column works for the defaulted VARCHAR2 columns.  Go figure! 
    (more)  And I could not get it to work with "Item" (P63_RUN_DT) as the Default.   However, it seems to work -- so far -- using Default PL/SQL of TO_DATE(:P63_RUN_DT,'DD-MON-YYYY').

  • Whether the fields of a single row in an internal table has got value.

    I am doing an archiving report in PS Module.
    The table RPSCO has 12 fields which represent each month.The records in the table are based on OBJNR  and YEAR
    Now i need to check for the latest year which month has some value .If any of the month  has got some value i need to take that month.
    Sample table given below.
    OBJNR           year    Month1    month2      month3    so on
    1)PR00002409  2006     0.00     0.00     664.70-     0.00 0.00     0.00     0.00     0.00     0.00                                                                      
    0.00     0.00     0.00     0.00
    2)PR00002409  2005     0.00     0.00     0.00     0.00     0.00     0.00     0.00 0.00     0.00     0.00     48.70     127.20     0.00
    In this case the output should be Month3.Because the latest year is 2006 and Month is Month3.

    Hi Susmita,
    You have to use DO VARYING option from field 3 onwards.
    Below is the sample program to check whether the field has a value or not.
    tables: rpsco.
    data: it_rpsco like rpsco occurs 0 with header line.
    data: v_wlp type rpsco-wlp00,
          v_wtp type rpsco-wtp00,
          v_pos type i.
    select * from rpsco into table it_rpsco where gjahr = '2007'.
    if lines( it_rpsco ) gt 0.
    loop at it_rpsco.
      clear v_pos.
      do 16 times varying v_wlp from it_rpsco-wlp00 next it_rpsco-wlp01
                  varying v_wtp from it_rpsco-wtp00 next it_rpsco-wtp01.
       v_pos = v_pos + 1.
       if not v_wlp is initial.
         write:/5 v_pos , 35 v_wlp, 70 v_wtp.
         exit.
       endif.
      enddo.
    endloop.
    endif.
    Regards,
    Kumar Bandanadham
    Edited by: Velangini Showry Maria Kumar Bandanadham on Jun 1, 2009 9:30 AM

  • User changing values of performed calculation

    Is there a way in acrobat for the user to change the value of a calculated field once a calculation has already been performed?
    Is there a script you can create to over-ride the calculation being performed?
    Thanks

    What I posted will automatically calculate the field whenever either the tax1 or taxbase field value changes. If the tax1 field is blank, it will use the default value of 4.5. The user is then able to manually change the value of the calculated field if desired.
    For what it's worth, the following line of code probably does not do what you think it does.
    (Number(this.getField(Field_Name).value.length) != 0)
    When the value of the field is numeric (e.g., 1.2), the data type of the value will be number, and since a number does not have a length property, it will return the special value of "undefined". When undefined is converted to a number using Number, it returns the special numeric value of NaN. Since NaN is not equal to zero, the result of the comparison in the if statement will always be false. That's why I retrieved the value of the field as a string, since it is easy to see if the field is blank and you can simply use the + operator to convert it to a number.
    It doesn't appear as though you posted the entire code that you were using (note the missing closing curly bracket), so I'm not sure the revised code is doing what you want. Is the following true:
    1. When the tax rate field is blank, calculate using the default value of 4.5
    2. When the tax rate field has a value that's not equal to 0, calculate using the value in the tax rate field.
    Exactly what should happen if the tax rate field is not blank but the value is equivalent to zero (e.g., "0", "0.00", ".", "-", etc.)?
    Do you want the user to be able to enter whatever they want in the calculated field, thus manually overriding the calculated value?

  • Who has changed the Custom Field value?

    Dears,
    Need to know the information regarding how to fetch that who has changed the Custom field value from PWA/MPP.
    Example:
    There is a PDP (say ProjectInfo):
    There is a Custom Field added to that PDP (say Project Status = In Progress).
    Now for ProjectA, someone has checked out and changed the Custom Field "Project Status" from "In Progress" to "Closed".
    I need to fetch the information regarding who has changed that Custom field.
    In which direction should I move: Event Handlers, PSI???? Any other stuff?
    Thanks & Regards,
    Shravan

    Hi Shravan,
    I'm not a developer but I do know that you can use an event handler pushing the resource name and date in custom fields.
    Another way is to use a 3rd-party tool like
    FluentPro Audit Tool.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • Fields don't recognize their value has changed when a copy/paste value in inputed

    I'm having a minor hiccup with my copy and paste buttons.
    I have check boxes that, when checked, make other fields visible.  The copy/paste actions recognize when the check box value is 1 and paste accordingly in the new instance of the subform, however, the invisible fields do not become visible, despite the check box value being 1 in the new instance.  I feel like I'm missing something simple....possibly something that forces the scripting within the check box field to run since it is not recognizing that it's value has changed?  If I manually click the check box in the new instance, the scripting works and the invisible fields become visible so I know its not an issue with creating new instances.
    Any suggestions will be appreciated...I am new to this...
    Scott

    Still interested in solving this issue....anyone? please?

  • Validation error while trying to change a value in a request scope bean

    - JBoss 4.2.3.GA
    - JSF 1.2_09-b01-BETA1 (Mojarra)
    - Java 5 Update 17
    Hello, everybody!
    I'm having the following problem in my JSF web application:
    I have a request scope backing bean. The first time this bean is loaded (I check
    this with the ResponseStateManager.isPostBack() method) I fill a list of SelectItem
    instances that are to be displayed in the JSF page in a +<h:selectOneMenu>+ component.
    The list goes, of course, to the +<h:selectOneMenu>+'s +<f:selectItems>+ facet child
    component. In the constructor I also define the value that goes to the value property
    of the +<h:selectOneMenu>+ component. This value is a property in the backing bean, as
    is the list of SelectItem instances. Until now we have something like this:
    The backing bean declaration in faces-config.xml:
    <managed-bean>
        <managed-bean-name>solicitacaoGeral</managed-bean-name>
        <managed-bean-class>br.urca.solicitacoes.web.PaginaSolicitacaoGeral</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The relevant parts of the JSF page:
    <h:form id="form">
        <h:selectOneMenu value="#{solicitacaoGeral.setorOrigem}" id="foco">
            <f:selectItems value="#{solicitacaoGeral.setoresOrigem}" />
        </h:selectOneMenu>
    </h:form>
    The relevant parts of the backing bean class:
    public class PaginaSolicitacaoGeral
        private final List<SelectItem> fSetoresOrigem = new ArrayList<SelectItem>();
        private Setor fSetorOrigem;
        public PaginaSolicitacaoGeral()
            if (primeiraExibicao()) // First load (!ResponseStateManager.isPostBack())
                // Fill fSetoresOrigem...
                fSetorOrigem = ...
            else // Page submitted
                // Read below...
        public List<SelectItem> getSetoresOrigem()
            return fSetoresOrigem;
        public Setor getSetorOrigem()
            return fSetorOrigem;
        public void setSetorOrigem(Setor setorOrigem)
            fSetorOrigem = setorOrigem;
        private boolean primeiraExibicao()
            String idFerramentaExibicao =
                FacesContext.getCurrentInstance().getViewRoot().getRenderKitId();
            ResponseStateManager gerenciadorEstadoResposta =
                RenderKitUtils.getResponseStateManager(
                FacesContext.getCurrentInstance(), idFerramentaExibicao);
            return !gerenciadorEstadoResposta.isPostback(
                FacesContext.getCurrentInstance());
    }But when the user submits the form and the bean constructor is called again
    (this time the method ResponseStateManager.isPostBack() returns true ),
    in the else block in the constructor above, I need to fill fSetoresOrigem with
    other values and also the fSetorOrigem field because, of course, the fSetorOrigem
    field has to be a valid value that exists in the new fSetoresOrigem list.
    JSF is not complaining about the change to the list items, but it is complaining
    to the change to the fSetorOrigem field (the list value), even though it is a
    valid value present in the list. So I'm getting this error message:
    08:23:54,312 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
    sourceId=form:foco[severity=(ERROR 2), summary=(form:foco: Validation Error: Value is not valid), detail=(form:foco: Validation Error: Value is not valid)]I suppose that JSF is comparing the new value of the field fSetorOrigem with the value
    it has in the view state. As the value is different it is raising the error. That's
    what I suppose. But am I not able the change the value in the postback? I've already
    checked and the value is valid. It corresponds to a value that exists in the list.
    I really need a solution to this problem as I'm stuck with this and can't proceed until
    I find a solution to this. What I am doing wrong and how can I solve this?
    Thank you very much.
    Marcos

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

Maybe you are looking for