need a better way to reset the selected cells in a table

Hi all

I've been watching the various threads of discussion reset only certain fields in a form and leaving the others unchanged.

The form, I am currently a table of 20 lines of body with 8 columns. I want to have a reset button that resets the 6 cells in each row.

I use the following code snippet:

for (var equal nrow = 1; nrow equal < 21; nrow equal ++)

for (nCell var = 0; nCell < 6; i ++)

{

xfa.host.resetData ("form1.page1.wrapper.ICC.Table1.Row [" + equal nrow + "] .rate [" + nCell + "]");

}

It works but it is extremely slow (order of 10 seconds) and my pc is not outdone.  There must be a simpler (and faster!) way to do it.

I saw a thread where cells that were to be spared from reset could be entered but could not do this work to all the. I thought to put the cells to be spared in a subform, but that went nowhere, because I was able to place cells individual separate subforms.

Any suggestions will be welcomed with formcalc script if possible :)

Thank you.

Harry Ohm.

Edit: now, it seems that this does not work as I first thought. It works on a single line, but not when the nested for loops are used.

Post edited by: HarryOhm

Hi Harry,.

Just two quick questions. I would wrap the first for loop {} and then you have i ++ in the second loop:

for (var nRow = 1; nRow < 21; nRow++)
{
     for (var nCell = 0; nCell < 6; nCell++)
     {
          xfa.host.resetData("form1.page1.wrapper.ICC.Table1.Row[" + nRow + "].rate[" + nCell + "]");
     }
}

It seems that your table is static (lines do not repeat). One option would be to build a variable/string with object names and reset that. It is an example of a reboot of one of our forms (http://assure.ly/gBJYj9). Here it is set to zero, a line and two fields outside the table:

// reset page 6 only
var f1 = Table1.Row1.description.somExpression + ", ";
var f2 = f1 + Table1.Row1.quantity.somExpression + ", ";
var f3 = f2 + Table1.Row1.unitPrice.somExpression + ", ";
var f4 = f3 + positionedSF.myName.somExpression + ", ";
var f5 = f4 + positionedSF.myAddress.somExpression;

xfa.host.resetData(f5);

Hope that helps,

Niall

Ensure the dynamics

Tags: Adobe LiveCycle

Similar Questions

  • Is there a better way to make the selection on this slider?

    Is there a better way to make the selection on this slider?
    I need to retrieve the test scores max (tesc_code SO1, S02, S03 etc... etc...)
    I get the results presented here, but I wonder if it's a better way to do this.
    The results should be back in the same cursor... e
    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    IS
    SELECT   s01.sortest_pidm       pidm_s01,
             s01.sortest_tesc_code  tesc_code_s01,
             s01.sortest_test_score score_s01,
             s02.sortest_pidm       pidm_s02,
             s02.sortest_tesc_code  tesc_code_s02,
             s02.sortest_test_score score_s02,
             s07.sortest_pidm       pidm_s07,
             s07.sortest_tesc_code  tesc_code_s07,
             s07.sortest_test_score score_s07,
             s08.sortest_pidm        pidm_s08,
             s08.sortest_tesc_code   tesc_code_s08,
             s08.sortest_test_score score_s08,
             s09.sortest_pidm        pidm_s09,
             s09.sortest_tesc_code   tesc_code_s09,
             s09.sortest_test_score  score_s09
      FROM   saturn.sortest s01,
             saturn.sortest s02,
             saturn.sortest s07,
             saturn.sortest s08,
             saturn.sortest s09
     WHERE       s01.sortest_tesc_code IN ('S01')
             AND s01.sortest_pidm = p_pidm
             AND s01.sortest_term_code_entry = p_term
             AND s01.sortest_test_score =
                   (SELECT   MAX (s01a.sortest_test_score)
                      FROM   saturn.sortest s01a
                     WHERE   S01.sortest_pidm = s01a.sortest_pidm
                             AND S01A.sortest_tesc_code IN ('S01'))
             AND s02.sortest_tesc_code IN ('S02')
             AND s02.sortest_pidm = p_pidm
             AND s02.sortest_term_code_entry = p_term
             AND s02.sortest_test_score =
                   (SELECT   MAX (S02A.sortest_test_score)
                      FROM   saturn.sortest s02a
                     WHERE   S02.sortest_pidm = s02a.sortest_pidm
                             AND S02A.sortest_tesc_code IN ('S02'))
             AND s07.sortest_tesc_code IN ('S07')
             AND s07.sortest_pidm = p_pidm 
             AND s07.sortest_term_code_entry = p_term
             AND s07.sortest_test_score =
                   (SELECT   MAX (S07A.sortest_test_score)
                      FROM   saturn.sortest S07A
                     WHERE   S07.sortest_pidm = S07A.sortest_pidm
                             AND S07A.sortest_tesc_code IN ('S07'))
             AND S08.sortest_tesc_code IN ('S08')
             AND S08.sortest_pidm = p_pidm 
             AND S08.sortest_term_code_entry = p_term
             AND S08.sortest_test_score =
                   (SELECT   MAX (S08A.sortest_test_score)
                      FROM   saturn.sortest S08A
                     WHERE   S08.sortest_pidm = S08A.sortest_pidm
                             AND S08A.sortest_tesc_code IN ('S08'))
                     AND S09.sortest_tesc_code IN ('S09')
             AND S09.sortest_pidm = p_pidm 
             AND S09.sortest_term_code_entry = p_term
             AND S09.sortest_test_score =
                   (SELECT   MAX (S09A.sortest_test_score)
                      FROM   saturn.sortest S09A
                     WHERE   S09.sortest_pidm = S09A.sortest_pidm
                             AND S09A.sortest_tesc_code IN ('S09'));

    Hello

    The problem is that you to act as a Cartesian product with all the tables (you will get: S01 * S02 * S08 * S09 lines!) Is it really what you want?
    I don't think...

    Wharton, you can do (with no Cartesian product) is:

    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    IS
    SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
           sortest_test_score score
      FROM sortest
     WHERE (sortest_tesc_code, sortest_test_score) IN (
              SELECT   sortest_tesc_code, MAX (sortest_test_score)
                  FROM sortest
                 WHERE sortest_tesc_code IN ('S01', 'S02', 'S07', 'S08', 'S09')
                   AND sortest_pidm = :p_pidm
                   AND sortest_term_code_entry = :p_term
              GROUP BY sortest_tesc_code)
       AND sortest_pidm = :p_pidm
       AND sortest_term_code_entry = :p_term
    

    However you absolutely need a Cartesian product, you can do:

    WITH allrows AS
         (SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
                 sortest_test_score score
            FROM sortest
           WHERE (sortest_tesc_code, sortest_test_score) IN (
                    SELECT   sortest_tesc_code, MAX (sortest_test_score)
                        FROM sortest
                       WHERE sortest_tesc_code IN
                                              ('S01', 'S02', 'S07', 'S08', 'S09')
                         AND sortest_pidm = :p_pidm
                         AND sortest_term_code_entry = :p_term
                    GROUP BY sortest_tesc_code)
             AND sortest_pidm = :p_pidm
             AND sortest_term_code_entry = :p_term)
    SELECT s01.pidm pidm_s01, s01.tesc_code tesc_code_s01, s01.score score_s01,
           s02.pidm pidm_s02, s02.tesc_code tesc_code_s02, s02.score score_s02,
           s07.pidm pidm_s07, s07.tesc_code tesc_code_s07, s07.score score_s07,
           s08.pidm pidm_s08, s08.tesc_code tesc_code_s08, s08.score score_s08,
           s09.pidm pidm_s09, s09.tesc_code tesc_code_s09, s09.score score_s09
      FROM allrows s01, allrows s02, allrows s07, allrows s08, allrows s09
     WHERE s01.tesc_code = 'S01'
       AND s02.tesc_code = 'S02'
       AND s07.tesc_code = 'S07'
       AND s08.tesc_code = 'S08'
       AND s09.tesc_code = 'S09'
    

    The lines will be stored in memory to a temporary table before that product happen (should be faster)...

  • Looking for a better way to count the responses to the survey questions

    Hello all - I have created a survey for a site and now want to display the results to the admins of the site. I am trying to display the countdown - the number of times that a question has been answered in a certain way. I realize that I may need to build the investigation itself differently and how it stores data, but here is how it goes far.

    There are 10 questions, each with 4 options of radio button groups. The database table contains a column for each issue and stores the value of the selected option button. So it's pretty simple.

    Now on the results page, that it's the only way I can think to do, but there must be a better way. For each answer, I create a Recordset filtered on the issue and the value option, then display the total number of records. Which works great, but count each option, which means that 40 recordsets on the page - al simply determine "how many times was the Question 1, Option was selected and how many times has the Question 1, selected Option B and so on.»

    The only other thing I can think it maybe is a better way to count the occurrences of these values in the table is with PHP or in the SQL itself.  Or, perhaps, if the values themselves are entirely digital and follow a kind of model I can use a solution of math.

    Thoughts, solutions, and ideas are welcome!  Thank you.

    Your problem is a bad design. You should have a separate line for each answer, not to separate the columns. It also makes the very rigid investigation. A simple design would include a few tables - a master of the investigation that stores the questions and response table that contains a foreign key to the question number in the master, the answer, as well as any other details you need to capture. You might get more elaborate, but it's essential. Your result page and then just be a single recordset with a simple query with a group by clause.

    I urge you to review this before going any further.

  • What is the other possible way to reset the new hash in 12 c value

    What is the other possible way to reset the new hash value in 12 c (edit user < username > identified by the values < "Hash" >;  ?

    Thank you

    Suman

    Thanks for all the help.

    Problem has been resolved. There was little extra space (undesirable character in file) which has been provided by the user. Monday, I created a test user and manually run reset password and has worked well:

    SQL > select banner version of v$.

    BANNER

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

    Database Oracle 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit Production

    PL/SQL Release 12.1.0.2.0 - Production

    CORE Production 12.1.0.2.0

    AMT for Linux: Version 12.1.0.2.0 - Production

    NLSRTL Version 12.1.0.2.0 - Production

    SQL > alter the test user identified by test2;

    Modified user.

    SQL > select name, password of the user$ where name = 'TEST ';

    NAME PASSWORD

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

    TEST A43C4E7D0745AB7D

    SQL > alter user identified by the values "A43C4E7D0745AB7D" test

    Modified user.

    My apologies without testing on my side I asked a question here.

    Thank you.

    Suman

  • Is there a need or a way to turn the pencil off the power when you do not use?

    Is there a need or a way to turn the pencil off the power when you do not use?

    Unfortunately not. The best thing is to turn off bluetooth. However, you will need to re - pair the iPad and the pencil again by plugging in the port of lightning. When not used the pencil of apple do not lose a lot of power.

  • is there a way to reset the WEP key of a Netgear router, which shows not compatible with my computer as a wireless router?

    Daughter's boyfriend installed Netgear router wireless, but everyone has forgotten the WEP password, and I had to reset it and now can not get the wireless to the top.  Is there a way to reset the security password, and it shows the router, but cause 'inconsistent', says there is no security password to connect to it.  HELP, please!

    Thank you

    Kelli

    Maybe some help here: reset and restore the NETGEAR device to factory default settings

  • Is there a way to reset the SuperFetch?

    Hi all,

    Core Intel Quad Q8200 @ 2, 33GHz

    4 GB of RAM

    Windows 7 Premium x 64

    Question: Is there a way to reset the Superfetch?

    I have seen/read the solutions on the forum but most of the time related to XP or Vista and I was wondering if it is possible to reset the Superfetch to a clean state and let it rebuild from scratch.

    Reason why I ask is a very high memory use, crawling upward after the restart of 25000 KB up to more than 1, 8 GB (search in taskmanager and ill with Process explore (Sysinternals) it down to Superfetch (SysMain).) The entire system making it sluggish.

    Recently had a disc that has been started to brake down and succeeded him and used speakers to put everything back in place (because I had just 2 months before doing a clean Win7 (x 64) new reinstall and finally all my software and ready updates).

    However, to be able to start and be able to create an image with True Image, I had to do a restart of Windows with repair of the dvd. Now in the search for this use of memory looked in the Windows\Prefetch directory and I see a lot of programs that are not used after that replace hard drive (Tools for finding the problem hard drive etc..).

    Maybe it's the reason that SvcHost (LocalSystemNetworkRestricted) running this Superfetch (SysMain) uses a lot of memory. I know what Superfetch is for and do not want to disable it simply leaves start again and get rid of all the old .pf files in this directory.

    Also watched to see what Ccleaner (with option clean prefetch advanced), but it shows some (19) of all files (75) in there and doubt that only clean the .pf files would cause Superfetch start at zero?

    As far as I understood another display that he uses other files I could delete (AgGlFaultHistory.db AgGlFgAppHistory.db AgGlGlobalHistory.db) but also read that I could remove all %SystemRoot%\Prefetch as answer in this forum (link below)

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-system/SuperFetch-error-2/fd52fc9d-DBD8-48e3-94c3-1d06a249a912

    Hope someone can help with this. Thanks in advance.

    Hello

    Thank you for your response.

    I appreciate your time.

    I suggest you to remove all the contents of the folder 'Prefetch' and check the issue.

    However, try using "ReadyBoost" as soon as you have access to any USB flash drive.

    Please keep us updated on the status of the issue.

    Thank you

  • Is there a way to reset the parameters of an inner glow effect changed the default settings, Illustrator CC 2015?

    Is there a way to reset the parameters of an inner glow effect changed the default settings, Illustrator CC 2015? Every time I have to create and apply settings for an effect Illustrator crashes on them the next time I want to create a new effect. Can I reset their value by default without quitting smoking and redtarting the program?

    Thank you

    DC

    I don't know. Best thing to do is to click on the effect in the appearance Panel, and then change the numbers 75% &.07 inches.

    I really recommend to avoid using an inner glow altogether. You have more control and creative options by adding a line and a Gaussian blur and using the appearance Panel. You also does not slow down your computer like by stacking of multiple instances of internal flow for example a brighter glow.

    If you still wish to continue to use the inner glow, you can make a few graphic styles and add to your library to quickly switch your inner glow settings.

  • Is there a better way to remove the toolbar "Frequently used tools" (which I've never used!) to open whenever I open Acrobat reader. rather than uninstall Acrobat and use another PDF reader?

    Is there a better way to eliminate the "frequently used tools.
    toolbar (which I've never used!) to open whenever I open Acrobat
    drive. rather than uninstall Acrobat and use another PDF reader?

    Hi jg49392310,

    You can disable the tool pane with Adobe Acrobat Reader DC was last updated, see this note cover hide the tools Panel in Acrobat and Acrobat Reader DC at all times.

    Kind regards

    Nicos

  • Best way to update the individual rows of a Table?

    I took a quick glance at a few examples, but did not get a clarification on this.  I am looking to have something close to a listbox control or the table to where I can update just one column of values to line a 1 time per second pace.  I'm looking to display our acquisition of data values in a table or a listbox control.  The single list box seemed to work well for that, but I couldn't use the row headers to list the names of channel beside the channel values.  I thought to link the values of cursor in two areas of list to do this, but did not find any info on it for the single list box.

    I have a few questions:

    (1) I have a 1 d table to where I want to use this data to constantly update the first column (with a multitude of lines) of a table.  I'm looking for the best route to not take too much time for treatment by doing this.

    What is the best way to update the individual rows of a table?   Invoke the node "Value of the cell value"... or is there another method?

    (2) why is that, after each iteration else, row values are deleted?

    Also, for adding additional channels originally arrray... it is better to use the 'Array' subset then the function "Construct the table" or function "Subset of the table" and "insert table"?

    See the attached example.

    Thank you.

    Jeff· Þ· Bohrer says:

    (2) why is that, after each iteration else, row values are deleted?

    Classic race condition.  dump the loop and node-p and just wire the 2D table on the terminal Board. !

    I don't see the race condition.  What I see is the table once the last element has been written for it all run the oil.  I saw looked it with point culminating performance on.

    But I agree entirely with writing to the Terminal.  It is a 1 d array, so you will need to use an array of generation and convert a 2D array in order so that he could write correctly.

  • Programmatically change the selected cell/line of control multi-column listbox

    I want to programmatically change the selected cell of a multicolumn list box whose selection Mode is set to highlight the whole line.  I would use this to highlight the line whatever the list box, I chose to.  It would work the same way if the user has clicked on a line to select and highlight that particular line.  Set Active cell does not fulfill this.

    Steve

    Try to use the property value; p

  • Updated all the selected lines in a table.

    Hello

    Jdev Version 11.1.2.3.0

    I'm trying to update all the selected rows in a table with several choices.

            AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
            ViewObject vo = am.findViewObject("RegistrationHistory1");
            RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys();
    
    
            if (selectedRegistrations != null) {
                Iterator iter = selectedRegistrations.iterator();
                    while (iter.hasNext()) {
                        Object facesTreeRowKey = iter.next();
                        Row[] row = vo.findByKey((Key)((List)(facesTreeRowKey)).get(0), 1);
    
    
                        if (row != null && row.length == 1) {
                            Row r = row[0];
                             r.setAttribute("Attr", "1"); 
                        }
                    }
              }
    

    But after I put the attribute on the line. My iterator ignores most of the lines and they don't last updated.

    It works very well for the removal of the line well.

    Any suggestions?

    It turn out that I got a try catch and in the catch, I had a log (e.printStackTrace ()) and I do not see a single line in the diary saying ConcurrentModificationException appearing all the time.

    Looks for read-only access to an attribute or delete lines is OK to iterate over the selected lines, but it's different for the modification of an attribute.

    The code that worked:

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    Entry DCIteratorBinding = bindings.findIteratorBinding ("RegistrationHistory1Iterator");

    RowSetIterator regRSiter = regIter.getRowSetIterator ();

    RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys ();

    Object [] keys = selectedRegistrations.toArray ();

    for (Object key: keys) {}

    Line currentRow = regRSiter.getRow ((Key) ((List) key) .get (0));

    removeOrModify (currentRow);

    }

  • Is there a better way to generate the custom timed digital signals

    I'm trying to generate the digital output from the top and down with delays on different lines. Each daq assistant is activate single line on a port USB 6501. There more complex high and lows that I need to generate variable time difference between high and low. There is codebelow that does what I'm trying to achieve, but for a model executing high and low signal is much of your time to do it this way. I'm sure there is a better way to do it, I'm not an expert on labview so I only discovered its potential. Anyone can suggest a more effective and a quick way to do it. I would like to hgihly appreciate. Thank you!

    I've not shown in the code below, but using the DAQ assistant, I initialized lines at low logic level.


  • A better way to treat the form as a table with the variable column type?

    I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.

    Decode (sys_flag, 'Y', APEX_ITEM. DISPLAY_AND_SAVE 3, TYPE_CODE, APEX_ITEM. SELECT_LIST_FROM_LOV (3, TYPE_CODE, 'LOV_TYPE_CODE_LOV')) AS TYPE_CODE

    To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
    "Expression HTML" to "#TYPE_CODE #
    ' Display under "to"text display (saves the State).

    And then it took me to get new lines of work:
    "Default of Type" to "Expression of PL/SQL.
    'Default' to APEX_ITEM. SELECT_LIST_FROM_LOV (3, NVL(:P18_TYPE_CODE,'LOV_TYPE'), NULL, 'LOV_TYPE_CODE_LOV', ' NO')

    This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.

    Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.

    Hello

    I tried different possibilities and seems to run the following:

    Create a report questioning in NORMAL SQL function to help:

    SELECT
    APEX_ITEM.HIDDEN(1,EMPNO) || APEX_ITEM.TEXT(2,ENAME) ename,
    CASE WHEN DEPTNO = 10 THEN
     APEX_ITEM.HIDDEN(3, SAL) || SAL
    ELSE
     APEX_ITEM.TEXT(3, SAL)
    END SAL,
    EMPNO,
    DEPTNO || APEX_ITEM.MD5_CHECKSUM(ENAME, SAL) DETPNO
    FROM EMP
    

    Do not specify something special for column definitions.

    Create a button that submits the page.

    Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:

    BEGIN
    APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:EMP:EMPNO,1:,|ENAME,2:SAL,3');
    END;
    

    I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35

    Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.

    APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC

    Andy

  • Need help: best way to exchange the Ipads?

    Dear all,

    Need help a genre:

    I use Ipad Air2 and my father is using retina Ipad Mini... I gifted him before 2 years...!

    We thought to share the Ipads because he loved the biggest... Can someone guide what is the best way to swap the parameters of the iPad?

    It is by taking backup and restore from Icloud? There will be data loss? or anything else that needs attention (something that he needed to be reconfigured)?

    Any help is very appreciated!

    Make a backup of each individual iPad. Use your own accounts: How to back up your device using iCloud or iTunes - Apple Support

    Import your photos from each iPad: import pictures and videos from your iPad, iPhone or iPod touch to your computer - Apple Support

    Then do it on every iPad: what to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

    Then restore the backup in your 'new' ipads: restore your device from an iCloud or iTunes backup - Apple Support

    If the ipads have the same size of storage with the same iOS version, it should work fine. -AJ

Maybe you are looking for