Show LOV only when the field is empty

Hi all
My surroundings:
Oracle 10g on Windows
Forms [32 bit] Version 9.0.4.1.0 (Production)
Oracle Database 10 g Enterprise Edition Release 10.2.0.5.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
Oracle Toolkit Version 9.0.4.1.0 (Production)
PL/SQL Version 9.0.1.5.1 (Production)

My problem:
I have a field in a block, which is text_item and is linked to an element of LOV. I want the LOV appears automatically, whenever I tab in there, only when the element is EMPTY (for example when I try to insert in the block). When, upon request, it should show only the value in the field, and user can choose to activate the LOV, by pressing F9, if she wants to. It now displays automatically each time text agenda is a debate (works very well when the user is inserted, but annoying when she questioned the shape and trying to tab thru.) Every time she focuses on the field, LOV is popping up!)

The current setting for the property on the element of text field: Type: text element
The list of values: MY_LOV_NAME
Validation of list: Yes

Properties on MY_LOV_NAME
Auto display: Yes

Any suggestions? Or trigger level I can use, and if so, what build_in can use?
New forms and will greatly appreciate advice from pros!

Thank you
Libran_girl

It's very simple,

IN once - new - item - Instance

DECLARE
V_LOV BOOLEAN;
BEGIN
IF: NOM_ELEMENT IS NULL
THEN
V_LOV = SHOW_LOV (LOV_NAME);
END IF;
END;

Try it, you will get your result, if it doesn't work, try: block_name.item_name

Abbas

Tags: Oracle Development

Similar Questions

  • Format custom text field only when the field is filled

    I have created a form that I need to have the format of a text field "model:"& value of text field, then when it is empty so it is just empty.»

    I put event.value = "template:" + event.value; "." in the format custom properties of the text field it set to format correctly, but if it had not entered in this field he said always model: so what should I do for it to be only occur when there is something entered in the field.

    Change to:

    If (event.value) event.value = "template:"+ event.value; ".

  • Calculated hidden field when the field is empty

    It is actually similar to a discussion a few months ago. Our forms are designed to be completed online, printed and sent by electronic mail, by fax or snail - mail. Many times the customer will simply print the form and complete it by hand. When I create forms with calculations, the ' $' or '0.00' appear; This makes it difficult for a person filling out the form by hand to work around these symbols/numbers. A few months ago I had a similar situation involving the percentages and the gurus on this forum (thanks, gurus!) has helped me with the following code and it worked perfectly to hide the fields calculated, unless something has been entered in the fields to calculate.

    A field with a format of 'None' user custom validation script:

    if(Event.Value == 0) {}
    Event.Value = ""; Set null field;
    AFNumber_Format (0, 0, 0, "", "", true); Set number format 0 decimals, not currency.
    } else {}
    Event.Value = event.value; keep the value;
    AFPercent_Format (2, 0, 0); Set the percentage, 2 decimal format.
    }

    This time, the problem involves single numbers (not percent, no change). I used the same logic and fields actually hide/as I want, but the numbers should be formatted with a comma between thousands and decimal with two digits after. I can't understand this! Can someone please offer some advice? Thanks in advance for your help.

    Make sure you use the correct quotation marks. Use quotation marks or single quotation marks, and not 4 single quotes.

    if(Event.Value == 0) {}

    Event.value = "; Set the field null (2 single quotes).

    Supress Zero

  • Insert a NULL value when the field is empty

    Oracle 11 g 2

    Hi all

    This is probably a very simple question.

    Here's what's happening.

    I have a table:
    SQL> select * from mytable;
    
        MYCODE MYNAME          MYSAL
    ---------- ---------- ----------
          3456 Chris            8000
          9878 Bill
          6574 John             6500
    And I am running the following query:
    SQL> select 'insert into emp (empno, ename, sal) values (' ||mycode||', '||''''||myname||''''||', '||mysal||');'
    from mytable;
    gives me the following output:
    insert into emp (empno, ename, sal) values (3456, 'Chris', 8000);
    insert into emp (empno, ename, sal) values (9878, 'Bill', );
    insert into emp (empno, ename, sal) values (6574, 'John', 6500);
    If you notice, the second row has a sal as empty field. I want that he be null for what I can run this query to INSERT specific without having to manually enter the word "NULL" inside

    I think I need some kind of clause if-then here.

    If sal is NULL
    then the value NULL?

    Hello

    JrOraDBA wrote:
    ...
    If you notice, the second row has a sal as empty field. I want that he be null for what I can run this query to INSERT specific without having to manually enter the word "NULL" inside

    I think I need some kind of clause if-then here.

    Exactly!

    This condition IF-THEN-ELSE happening so often that they have designed a function for this.
    Instead of my_sal, use this expression:

    NVL ( TO_CHAR (mysal)
        , 'NULL'
        )
    

    It is:

    select 'insert into emp (empno, ename, sal) values ('      || mycode
                                                          ||    ', ''' || myname || ''''
                                 ||       ', '      || NVL ( TO_CHAR (mysal)
                                                         , 'NULL'
                                            )
                                 ||   ');'
    from   mytable
    
  • How to perform a calculation only if a field is empty

    I have the following script to generate a random 4-digit invoice number.

    this.getField("INVOICE_No").value = Math.floor (1000 + Math.Random () * 9000);

    It works fine, but if I hit the action button several times he continues to change the invoice number.

    Is there a way for her to run the script only if the field is empty?

    Yes, you just add something like:

    var f = getField ("BILL No.");

    If (! f.valueAsString) {}

    f.Value = Math.floor (1000 + Math.Random () * 9000);

    }

  • Hide the caption only when the content of the field is empty for an Adobe form field

    Hi all

    We try to hide only the caption of a field if the content of the field is empty.

    (a) the following code allows you to hide all cru (the entire field including the legend). What we should change the code to hide the legend?

    -------------------------------------------------------

    If (this.) RawValue is nothing)

    {

    This.Presence = "hidden".

    }

    -------------------------------------------------------

    (b) another option would be to use the conditional formatting-> change of text in the caption to the text color white, if the content of the field is empty to make it invisible on print.

    Are there options available ALD or code that must be used to achieve one of the options above?

    Thank you in advance!

    Kind regards

    Roy

    Modify the script to:

    If (this.) RawValue is nothing)

    {

    xfa.resolveNode("this.caption.value.#text").value = "";

    }

  • PDF forms have problems displaying text and only appears when the field is selected

    Hello

    I created pdf forms to be distributed to the clients of the company. But we have some people complain about the visibility of the text. When they work as a team, the pdf they receive from a third party often appears limes or no text, the text is only visible when the field is selected. I need to find a solution for this, because our company's products are based on this form.

    If there is any information addition that I must add to understand what is happening and how to fix it, I'll be happy to write it.

    In society, we all have mac and forms where innitially created in Adobe acrobat 9 pro, but we now have Adobe acropabt pro XI.

    Users of Mac and Windows systems.

    Thank you

    This is usually caused by the form is filled out and saved by a Mac user who uses the preview application to view the PDF file. More information is here: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html

    It's a good idea to inform your users that Adobe Reader (or Acrobat) should be used to work with Forms.

  • How can I get rid of zero in a calculated field when the form is empty?

    I made a form that prompts the user to enter data for specific years.  At the top of the form, the user places in the current year, i.e. 2000.  Column copy this year here, the second column adds five years and the third column adds 10 years.  I managed to create a simple script for each of these columns (so that when 2000 came; columns a, b, and c appear as 2000, 2005 and 2010) but when the form is empty a zero appears in the first cell, a 5 appears in the second cell and a 10 appears in the third cell.  I want the completely empty form so as to not confuse the person when they begin to enter data.  How can I write a custom script to eliminate the numbers in calculated fields?

    I would use a script for calculating customized for each of these fields. Something like:

    Calculation for reference year script

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? v : "";

    })();

    Calculation script for field goal 5 years

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? +v + 5 : "";

    })();

    Calculation script for the 10-year target field

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? + v + 10 : « » ;

    })();

  • How do I run a script only if the field is not empty

    How do I run a script only if the field is not empty

    Well well, thanks to you, I had a full date on separate days, the months and the years in different areas. But now, I have a problem, as PDF has several fields calculated with script if you enter the date calculated by all other areas, which have separated and undefinied gives me does not want to put this to not always use this field. I tried to put one conditional if else but I sale. Esto, this is what I'm wearing

    var datesol = event.value;//declaramos the variable

    If (datesol = "") {}

    this.getField('yearsol').value = "";

    this.getField('monthsol').value = "";

    this.getField('daysol').value = ""}

    else {}

    var array_datesol = datesol.split("/"); / / separamos esa con date the split funcio

    this.getField('yearsol').value = array_datesol [2];

    this.getField('monthsol').value = array_datesol [1];

    this.getField('daysol').value = array_datesol [0];

    With what they do not separate them now.

    Help please

    As mentioned, you cannot use

    If (datesol = "")

    because that sets the value of datesol to «» (you will need to double for the comparison operator =)

    If you want to run code only if it is NOT empty, while it takes:

    If (datesol <> "")

  • Hide a Page when all fields are empty.

    Hello world

    I am currently using LiveCycle Designer ES 8.1, I must also point out that I am new in this field of Adobe.

    I need your help. I want to check if all the fields are empty, if so I want to hide this specific page, using JavaScript.

    Please note that all my fields are read-only. These fields will be filled using XML data.

    There are commands that will give you all the objects on a particular page... then you can scroll them (one at a time) to see if they are populated. I think you might encounter problems when you try to hide the page you are currently... .He would be an interesting exercise, however. If you send the data and form file to [email protected] I will give it a go when I had the chance.

    Paul

  • Calling a function only when the State is active

    I turn to find the event just to call a function only when the status is active. In fact, I created a State to display the 'product details' click and once the system changes to this State - I have to perform a function.

    Here's the context:

    Let's say that you are on the home page where you will need to click on a product to see details. By clicking on the product, the State to view the details of the product will be activated and a variable inside the new state you will receive all the data (from the class of product). But I discovered Flex run all States at the beginning and we need to watch how declare our function to make sure that we do not have a null to a variable/object reference. Given that value is moving to the State only when the click event to occur, the process of globalization, execution of all States at the beginning will not have any value yet (for the specific product to deal with in the State of the productDetails). So I can't use creationComplete to perform a simple function like setSpecs(), where all the values (for example, width, height, circumference, diameter, price, etc.) will be instiate specific labels.

    What event to use to call a function internal once we are in the State? Just using the creationComplet and stated if he check the currentState = that I have to work on is not enough. I tried 'activate', 'show', 'enterStage' and many others, but without success. I tried to search the Internet, but it seems that this problem is not popular enough to generate sufficient results.

    But I know that it is possible in the case otherwise it will be is not logical and since Flex work very well with the event, I found the right event. It's something basic I know, but when you do not know, it seems difficult to find! ;-))

    Thanks Greg!

    I agree, this is a better method. So I'll change my SENSITIVITY to use viewStack instead of the State. But the problem persists what that, if we use the viewStack State to launch an event only when the State/viewStack is displayed on the screen.

    I found something that works very well for me: updateComplete.

    First of all, I found this before reading your information about viewStack so it worked very well for the method of the State. That I decided to do a test to viewStack and made the necessary changes to the code to reflect a viewStack navigation and make sure the updateComplete was not within my component (stateProduct.mxml). The system was not able to view the specification as the setSpecs() function was not instantiate when displayed. I added the updateComplete = "{setSpecs ()} ' and everything worked great!" So I conclude that no matter if you are using a viewStack State, the updateComplete event can be used to run or functions only when the component is displayed on the screen.

    Now, I have to make my transition between the State working with viewStack effect! ;-))

    Thanks to Greg for this useful tip!

  • Skype rings only when the application is open

    I have a Skype number for my phone a few days ago and I just noticed a problem. When people try to call me using my Skype number, it sounds only when the application is open and the phone is unlocked. However, people can still call me normally on my Skype ID, it is locked or not currently open to the app. It's a rule I missed when having a Skype number?

    I reset my phone to factory settings and it works now.

  • Skype number rings only when the application is open

    I have a Skype number for my phone a few days ago and I just noticed a problem. When people try to call me using my Skype number, it sounds only when the application is open and the phone is unlocked. However, people can still call me normally on my Skype ID, it is locked or not currently open to the app. It's a rule I missed when with a Skype number?

    (Previously posted this in the Android subforum)

    I reset my phone to factory settings and it works now.

  • Display shuts off and comes back only when the Satellite A210 is restarted

    Hello

    Satellite A210 display goes off in time and returns only when the computer is restarted.
    Duration usual DURATION 30 or 45 minutes

    Please advice
    # Is it a hardware or software problem?
    # Some other face same problem brings advice?

    The machine is a year and a half old runs windows vista Basic that comes with it.

    I reinstalled the drivers card display also the problem remains same

    Hello

    Have you tried an external monitor on the laptop?
    If the external monitor works fine, it seems to be a problem of internal display and must be replaced.

    You use the factory settings on your laptop computer or you have installed your own version of Windows? Before turning to an authorized service provider, you need to restore factory settings to determine if it s a hardware or software problem. With the factory settings, everything should work fine and if not, I think it s a hardware problem.

    Check this box!

  • Re: Satellite Pro L670 - can I turn off the sound when the battery is empty?

    Hello

    Is it possible to disable the bios beep when the battery is empty or the laptop's Hibernate?

    I have a Toshiba Satellite Pro L670.

    Even when the sound in Windows is turned off the laptop do a annoying sound.

    Thank you!

    Maybe it sounds silly, but I put t understand why that should be disabled. When the battery reaches the critical battery level you will be informed about this and portable must be connected to the power running or you have to save your work and turn it off.

    Do you really want to work until the battery is completely discharged?

    Anyway, AFAIK this notification level BIOS cannot be disabled.
    Let's see if someone else is better informed than me.

Maybe you are looking for

  • a trusted site is considered to be an unreliable connection

    This connection is Untrusted You asked Firefox to connect safely to estore.thecmp.org, but we cannot confirm that your connection is secure. Normally, when you try to connect safely, sites will present a reliable identification to prove that you're i

  • iPhone 5 s January 1970 1 bug :(

    Hello, my changed my date to January 1, 1970, as everyone talks about, my phone wouldn't start, so I restored via iTunes (put my phone in recovery mode) after the first black line and apple logo fills the phone repeats the process (lights and then an

  • a6541fr: TWEETS of the card mother a6541fr

    Hello Where can I find the meaning of the beeps on the motherboard? not found in any of the documentation. Thank you very much. Polo.

  • Unknown to computer under the tab my network places - safety risk?

    Hello I have Windows 8 is installed on my laptop. I connect to my internet home wireless that is secured by a password. One day I opened my folder on the computer to check my hard drive space. I noticed a tab which was named, "network location" or "n

  • Where to find the serial number Adobe Cloud student/teacher added?

    Hi allI bought adding Adobe Cloud student-to-teacher and accompanying adobe products last year. I had about a year, with payments to be made. Shortly after I finished the payments, my computer fried.I bought a new one and there seems to be no way for