Check the last instance of a textfield is not null

I have a repeating subform that includes a textfield for the user to enter his name. When the user clicks a button e-mail customized to send the form, I first want to check if the last instance of this field is filled (non-null). I don't care about previous instances only the last instance. Custom e-mail button is pushed down below each instance of the subform is always just below the last instance of the repeating subform. Is it possible to refer to the last instance of a field in the subform when I do not know how many instances are created?

Thank you

Hi DKinsley,

I think that the code and the following steps will solve your problem.

(1) in order to know the last instance, you must find the number of available instances. This can be achieved with the following code.

var totalRowInstances = xfa.resolveNode ("form. Name.txtName").instanceManager.count;

(2) to access the last value of the index,

lastIndex var = totalRowInstances-1;

[Since the index always starts with 0]

var lastIndexNameCheck = xfa.resolveNode ("form. ("Name [" + lastIndex + '] '). txtName.rawValue;

If (lastIndexNameCheck! = null)
{
do something
}
on the other
{
do something
}

Please Note: here, form - refers to the root node, name - refers to the subform, txtName - made reference in the name of a text field.

Please let me know if this helped.

Thank you
VJ

Tags: Adobe LiveCycle

Similar Questions

  • How to identify the last instance of a dynamic table row

    Hi all

    I'm trying to figure out how to create an action for my form in Livecycle Designer ES2, which will affect the last instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a part purchased and I have buttons that allow the user to add and remove the lines. I need to create a line extra addition button which will add a new instance of the repeatable table line (this is not a problem) and disable and change the background color of the first cell in the row added. The problem I have is how to have an action that affects the last instance of a line.

    If anyone knows how to do this in Javascript, I would appreciate some advice/help.

    Hello

    I think that it is beyond providing an action. You will have a need to write JavaScript directly.  When you call the addInstance method it returns the new line, if you can do something like;

    var line = Table1._Row1.addInstance ();

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    To find the last line and do the same thing, you can do something like;

    var line = Table1.resolveNode ("Row1 [" + (Table1._Row1.count - 1) + "" "]" ");

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    Concerning

    Bruce

  • How to hide all instances of subform (via a click event of the button) except the last instance.

    When my form is rendered, it can contain multiple 'case' of a subform full page.  So basically, I have a subform labeled "Info" that spans a full page. Depending on how the form is used when a new instance is added to the document it essentially new creates an entire page.

    What I'm trying to hide all instances of subform ("Info"), except the LAST instance that is always on the last page.

    Theoretically, by hiding all previous subform instances (for example, 1-4) and keep only the last instance, it will reduce the number of pages 5-to-1.

    Hope it makes sense.

    SO I guess I need a way to get the number of instances of complete subform, then hide all instances, but the last instance (via a button click).

    Thanks in advance for your help.

    I belive I've thought about it.

  • After the last update of xp, we have not been able to change user without password. What do we do?

    Original title: change user

    After the last update of xp, we have not been able to change user without password. We do not know the password. What can we do?

    See if that helps...
    Cannot lock a "locked" computer administrator
    Be sure to check your screen savers.

  • I accepted the last update. Now, I can not display to the right of the main Itunes store, where top songs, etc would be. As the screen does not. Only on the HOMEPAGE of ITUNES STORE! Help!

    I accepted the last update. Now, I can not display to the right of the main Itunes store, where top songs, etc would be. As the screen does not. Only on the HOMEPAGE of ITUNES STORE! Help! I've tried everything. Google it. Searched through itunes, etc. It MUST be a bug, because it started right after I accepted the 12.3.3 update on my laptop running Windows 7 32.

    I count on the part of the main screen, which is not. Its strange. PLEASE HELP ME! In addition to the main page of the Itunes Store, everything else works fine as before. Music from my library work screens, etc.

    I also have exactly the same problem since the last update. Tried to find a way to solve the problem but no luck. Someone please help!

  • Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    This has happened

    Each time Firefox opened

    == June 28 2010

    Firefox 3.6.6 came out on 26/06/2010 to solve problems that some were plagued with the new crash protection feature introduced in Firefox 3.6.4. NOTE: Version 3.6.5 has been used for another product, so there is a "jump" in the version numbers.

    You need to update to the latest version, Firefox 3.6.6.

  • How to check the type of memory installed (ECC or not)?

    all!

    I have some servers Dell PowerEdge R420 and I want to upgrade memory, install more...

    How to check the type of memory installed (ECC or not)?

    Dmidecode output here:

    Drive.google.com/.../View

    Hello.

    Unfortunately, we are not able to open the link you have provided. You can display information about your memory on the web iDRAC under hardware and memory interface. You see the type of error correction (ECC or Non ECC) within the information memory page. You can also view the same information on OpenManage Server Administrator and even make use of the memory part number to find out more information.

  • Bridge 5.0.2.4 with camera RAW 8.4.0.199 ON a MAC 10.10.1. Try to update camera RAW 8.7 to get my canon 7dMK2 raw files to work. But the update I have the last update! Witch, I did not clearly. And my Photoshop have different camera RAW

    Bridge 5.0.2.4 with camera RAW 8.4.0.199 ON a MAC 10.10.1. Try to update camera RAW 8.7 to get my canon 7dMK2 raw files to work. But the update I have the last update! Witch, I did not clearly. And my Photoshop have different camera RAW plug-in. 8.4 the old and the new 8.7. But it does not work. Have removed and reinstalled several times. What is going on? Why can't update bridge to the last version 8.7 or read my raw files from the Canon 7dmk2?

    Try this:

    http://blogs.Adobe.com/Crawlspace/2011/03/keeping-Photoshop-up-to-date.html#NotConnected

  • Is there a way to define a text variable to pick up the last instance on a previous page?

    Hello

    I have a text variable to pick up at once in a document (which is defined with a character style). It's sort of schedule with multiple entries per hour.

    It works very well, however, its pages and pages of text, some of them wearing top of the previous page. For example, a page can start with 08:00 and the header is defined at 08:00, that works. 08:00 until almost the end of the next page, but 3 lines from the bottom is 09:00 in this case, I would still like this page to say at 08:00 and I would like to the next page to tell even if the first instance of the style of time on this page is from 10:00 to 09:00

    Any ideas if this is possible?

    Thank you! Much appreciated!

    Probably not without adding a non-printable tag at 08:00 in the page. ID running header variables are defined to use the page in progress, or look back only if there is no instance on the current page.

  • Replace in the last instance of expression string research with new words

    I have the T table with the data in the example below. The data have occurrences of phrace "ab" several times, several places. I want to replace the LAST occurrence of "ab" with the value "ab_last". How to write this query?
    with T as
    (
    select 'some symbols
      ab cd
      lot of occurences of ab here
      this is last ab occurence: ab
      some more symbols ' s from dual
    )   
    select REGEXP_REPLACE(T.s, '([^ab.]+)','\1_last;') as s from T
    /*
    END some sym_last;bols
      ab cd
      lot of occurences of ab here
      this is last ab occurence: ab
      some more symbols 
    */
    I think that Oracle has no function "ReplaceLast". And regular expressions cannot specify filter "the last of ' as I understand it. Then how to write the query?

    Expected result:
    'some symbols
      ab cd
      lot of occurences of ab here
      this is last ab occurence: ab_last
      some more symbols '
    --
    I have the 10g version.
    regexp_replace(T.s,'ab','ab_last',instr(T.s,'ab',1,-1))
    
  • Cannot display state of the last scan on windows Defender. Not available error - operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator

    Original title: problem with Defender

    Dear Experts,

    Windows Defender, I cannot view the status of my last scan.
    He says not available, it is saying the operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator

    What doi do

    Hi marneylou,

    (1) do you use the computer as an administrator?

    (2) is your computer connected to a domain network?

     

    Restart the computer, run the windows defender analysis and check to see if you can view the status of the last scan.

    Step 1: Stop and restart the Windows Defender service. To do this, follow the steps below:
    a. Click Start, type Run. (You can also use Win Key + R)
    b. type services.msc
    c. right-click Windows Defender service and click on stop > then start

    Step 2: You can see the steps mentioned in the article below

    Troubleshooting of Windows Defender

    http://support.Microsoft.com/kb/555957

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Downloaded the last CC of PhotoShop, but does not allow me to use the Warp Perspective, why?

    I try to use the last tutorial on perspective Warp. I did download today was last updated, but when I go to edit the Perspective Warp option is grayed out.

    Photoshop gray thing to when conditions do not allow it to be used.  The State could be linked to the current state of the current document or linked to the materials and software.  Perspective Warp requires a GPU and may also require an amount of VRAM.  Photoshop CC State requirements video adapter with GPU and at least 512 MB of VRAM.  You check the Photoshop preferences.

    Photoshop Edit menu > Preferences > performance GPU must be seen and activated.

  • Microsoft Update has a facility to check the history of updates, but it is not a facility in order to eliminate programs that were not updated, if the file has more than 6,000 entries?

    Microsoft Update offers an easy to install updates automatically, but a few times the process fails, leaving the record of the proceedings of breaking, this could happen for days even months and one day the process finished OK and also leaves the track of it, but she's not erase records of installation failures, because the file is a regular file , (this is not a data base), is there some facility to clean the file, he's great at more than 6,000 entries.

    Hello

    Thanks for posting in the Microsoft Community Forum, please be assured that we would do our best to help you.

    We cannot delete entries for updates failed, but we can remove all entries available in the Windows Update history.

    Rename the Windows Update temporary download folder and check:

    To rename the Windows Update temporary download folder, follow these steps:

    Important After you rename the temporary download folder, the updates that you have already downloaded but you have not yet installed must be downloaded from Windows Update or from Microsoft Update.

    In Windows XP, in Windows Server 2003 and Windows 2000, follow these steps:

    1. start Notepad. To do this, click Start, and then click run.

    2 copy and then paste (or type) the following command in the Open box, and then press ENTER:

    notebook

    3. copy and paste (or type) the following command lines in the Notepad window:

    net stop wuauserv
    CD %systemroot%\SoftwareDistribution
    Ren Download.old download
    net start wuauserv

    4. on the file menu, click on record underand type Rename.bat.

    5. click on record underand then click all files.

    6. save the Rename.bat file to your desktop.

    7. double-click on the file Rename.bat to rename the download folder.

    8. try to install the updates again.

    9. check if the Windows update history entries are removed.

    Hope this information helps. If you have any questions do not hesitate to answer, we would be happy to help.

  • To check the weather SD card is inserted or not.

    Hello

    Needs in my application to verify the presence of the sd card in the phone.

    can you please let me know, which api to use or all methods to check the presence of an sd card into the blackberry phone.

    Kind regards.

    It can be done...

    Check out this KB article...

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1295814/How_To...

    See you soon...

  • The last outbreak in this procedure do not insert, logical flow is right?

    Here is the code:

    {PROCEDURE PrAddDATU (p_EXPCLLI IN VARCHAR2,
    p_EXPIP IN VARCHAR2,
    p_EXPName IN VARCHAR2,
    p_EXPAddress IN VARCHAR2,
    p_EXPCity IN VARCHAR2,
    p_EXPState IN VARCHAR2,
    p_COPhoneNumber IN VARCHAR2,
    p_WCCLLI IN VARCHAR2,
    p_DialIn IN VARCHAR2,
    p_DialOut IN VARCHAR2,
    p_EXPRR IN VARCHAR2,
    p_PowerFuse IN VARCHAR2,
    p_HDFFrame IN VARCHAR2,
    p_PGTCFrame IN VARCHAR2,
    p_NTTFrame IN VARCHAR2,
    p_ColanRR IN VARCHAR2,
    p_ColanJack IN VARCHAR2,
    p_PollInterval in NUMBERS
    p_LeadNPA in NUMBERS
    p_EXPComments IN VARCHAR2,
    p_OwnerID in NUMBERS
    p_LRNNumbers IN VARCHAR2,
    p_MaintBegin IN VARCHAR2,
    p_MaintEnd IN VARCHAR2,
    p_EXPPort in NUMBERS
    p_LRNChecked IN VARCHAR2,
    p_LRNFacilityCode IN VARCHAR2,
    p_IsPrimaryAddress IN VARCHAR2,
    p_RTUTypeId in NUMBERS
    p_SiteName IN VARCHAR2,
    p_HostExpIds IN VARCHAR2)
    IS
    v_DATUID NUMBER;
    v_HostExpId NUMBER;
    v_HostExpIds VARCHAR2 (200);
    v_LRN VARCHAR2 (30);
    v_LRNS VARCHAR2 (400);
    v_LRNActive CHAR (1);
    v_LRNSActive VARCHAR2 (20);
    v_LRNFacilityCode CHAR (2);
    v_LRNSFacilityCode VARCHAR2 (300);
    NUMBER of v_pos1;
    NUMBER of v_pos2;
    NUMBER of v_pos3;
    NUMBER of v_pos4;
    BEGIN
    SELECT DATU_EXP_UNIT_INFO_SEQ. NextVal INTO v_DATUID FROM DUAL;
    INSERT INTO TT_DATU_EXP_UNIT_INFO VALUES (v_DATUID, p_OwnerID, p_EXPName, p_EXPAddress, p_EXPCity, p_EXPState, p_COPhoneNumber, p_WCCLLI, p_EXPCLLI, p_EXPIP, p_EXPPort, p_DialIn, p_DialOut, p_EXPRR, p_PowerFuse, p_HDFFrame, p_PGTCFrame, p_NTTFrame, p_ColanRR, p_ColanJack, p_PollInterval, p_LeadNPA, NULL, p_EXPComments, p_MaintBegin, p_MaintEnd, p_IsPrimaryAddress p_RTUTypeId (, p_SiteName, Sysdate);
    -Add new DATU in the TT_DATU_EXP_STAGING and TT_DATU_EXP_UNIT_INFO tables
    INSERT INTO TT_DATU_EXP_STAGING VALUES (v_DATUID, p_EXPCLLI, SysDate);
    "- Add new DATU in TT_DATU_EXP_ALARM_INFO with ALARM_TYPE = table ' G0 - stage"
    INSERT INTO TT_DATU_EXP_ALARM_INFO VALUES (v_DATUID, SysDate, 'G0', SysDate);

    -Add RTU to hosts
    v_HostExpIds: = p_HostExpIds;
    v_pos1: = INSTR (v_HostExpIds, ',', 1);
    WHILE v_pos1 > 0
    LOOP
    v_HostExpId: = TRIM (SUBSTR (v_HostExpIds, 1, v_pos1 - 1));
    IF v_HostExpId IS NOT NULL
    THEN
    INSERT INTO TT_HOST_SATELLITE VALUES (v_HostExpId, v_DATUID);
    END IF;
    v_HostExpIds: = SUBSTR (v_HostExpIds, v_pos1 + 1, LENGTH (v_HostExpIds));
    v_pos1: = INSTR (v_HostExpIds, ',', 1);
    END LOOP;

    -Si LRN cards entered add records to DATU_LRN_MAP
    v_LRNS: = p_LRNNumbers;
    v_LRNSActive: = p_LRNChecked;
    v_LRNSFacilityCode: = p_LRNFacilityCode;
    v_pos1: = INSTR (v_LRNS, ',', 1);
    v_pos2: = INSTR (v_LRNSActive, ',', 1);
    v_pos3: = INSTR (v_LRNSFacilityCode, ',', 1);
    WHILE v_pos1 > 0
    LOOP
    v_LRN: = TRIM (SUBSTR (v_LRNS, 1, v_pos1 - 1));
    v_LRNActive: = TRIM (SUBSTR (v_LRNSActive, 1, v_pos2 - 1));
    v_LRNFacilityCode: = TRIM (SUBSTR (v_LRNSFacilityCode, 1, v_pos3 - 1));
    IF v_LRN IS NOT NULL
    THEN
    INSERT INTO TT_DATU_LRN_MAP VALUES (v_LRN, v_DATUID, v_LRNActive, v_LRNFacilityCode);
    END IF;
    v_LRNS: = SUBSTR (v_LRNS, v_pos1 + 1, LENGTH (v_LRNS));
    v_LRNSActive: = SUBSTR (v_LRNSActive, v_pos2 + 1, LENGTH (v_LRNSActive));
    v_LRNSFacilityCode: = SUBSTR (v_LRNSFacilityCode, v_pos3 + 1, LENGTH (v_LRNSFacilityCode));
    v_pos1: = INSTR (v_LRNS, ',', 1);
    v_pos2: = INSTR (v_LRNSActive, ',', 1);
    v_pos3: = INSTR (v_LRNSFacilityCode, ',', 1);
    END LOOP;
    COMMIT;
    END prAddDATU;
    }


    The problem here is that the last insert in TT_datu_lrn_map table shows no insert at all.

    Any guru can help, please.

    Thank you

    No, they do not display on the web page. Part of the idea of using an EXCEPTION catch you the error and deal with it instead of having a random display ORA up who knows where such web page. Once you remove the table small error that I have given, you can do customized to adapt to what you have. I have take advantage of this and add variables so I can remember what line is a problem, or what value is tripping my code.

    I usually separate each insertion and update in its own block of exception with its own message. Otherwise you never know which him throwing an error.

    Found this and it could be useful at a glance:

    http://PLSQL-tutorial.com/PLSQL-exception-handling.htm

    Good to hear you code compiles without errors.

    Published by: mseberg on January 20, 2011 20:24

Maybe you are looking for

  • playlist to sync to iPhone

    HI - can someone provide a link to an article with instructions for synchronization a playlist from iTunes to iOS 9.2 12? I can't find any recent data. iTunes changed hurt so much I even find Manually manage music videos & - said that the only option

  • Live Webcam stream QR reader

    Hello I'm working on a live webcam QR reader so I'm doing this... but I don't know why it is not stream contineously?

  • HP chassis replacement

    Hello, I would like to ask HP sells a portable chassis separately, in particular the chassis of LCD Panel? I mean if the chassis is broken, like my 3 year old HP Pavilion dv2 the screen of the chassis is almost torn out... I am very worried because i

  • HP Envy all-in-one: how to show the password

    I'll put up my receipt just HP Envy all in one, and, while I have my Outlook dot com username and password configured properly, I am repeatedly asked for my password, even within the same session, whenever I go to a different application. This wouldn

  • Wireless router local only: Vista

    Hello, I use Windows Vista on my laptop which has the feature integrated wireless. Today, I tried to set up a wireless router to my laptop so I can connect to the internet. I have been using a modem for the past 2 years (Motorola, model SB5101i) and