Apex_application.g_fxx.count Question (problem?)

Do the apex_application.g_fxx variables need to be shown on the page (region) in order for apex_application.g_fxx.count to return a non-zero value?
I'm trying to figure out why I spent a day trying to get something to work, and it seems like this is what it was, though I'm not quite sure.
In my report region, I have a column that when shown, my process works correctly, where a loop that has the form of:
FOR i IN 1 .. APEX_APPLICATION.g_f16.COUNT
LOOP
This performs the statements within the loop.
However, if that column is not shown (under Report attributes, unclick the Show box), then the process does not seem to execute the statements inside the loop.
The only thing I can think of is that when it's marked as not shown, then the COUNT has no value, even though it seems like it should. Does COUNT only return the count of displayable items in the column, so if it's not shown, it's zero?
It also may be how the report region is defined as well I suppose. It seems like ApEx should understand it okay, but who knows. It's simply a join of two inline views, so I can pre-populate the region with values from another table if this table didn't have any entries.
This is Apex 2.2.1.00.04. One of these days I'll get caught up enough to upgrade to 3.0.
Thanks,
Bill Ferguson

Hi Patrick,
I suppose I also should have stated that this is a manually generated report region, using the apex_application.[item_type] syntax, where I have to specify the array (item) number. I just tested with Firebug, and if I change the number of the second column to 22, it's shown as f22 instead of f02.
g_f16 was the next to the last column, though the one after it is a hidden column (apex_application.hidden).
My report region is such, that g_f03 andg f16 are the only columns I can verify will actually have some data in it, as I force a value into gf16 if the second half of my union is selecting null values, so I could get around the null sorting problem (NULLS LAST didn't work, even on 10gR2, so I'm doing something else wrong).
Anyway, I can use the values of the columns, whether they are displayed or not, it's just that apex_application.g_f16.COUNT always returned a zero when the column was hidden, even though it consisted of an array of 5 values. Trying to track it down I was able send the value of the column to a logging table, so I was able to see that I was getting the values, just not the count of values.
Bill Ferguson

Similar Messages

  • Problem with apex_application.g_fxx.count

    Okay, I am at my wits end on this one.
    I'm running Apex 4, and on one of my screens I have a manually created tabular report. For one of the master records, this tabular report returns 12 rows, yet apex_application.g_fxx.count consistently returns 24 as the count. For other master records, this is working correctly however, returning the same number as what is showed on screen.
    I've tried to duplicate it on apex.oracle.com, but it works correctly there as well.
    I've checked the data table, and there are only twelve rows there, same as what the tabular report shows. I've added in TONS of code to report back what is happening and everything looks fine in the code and processing, but the data that gets saved is out out sync, since it appears that for some reason the xxx.count (for only this one master record) is somehow doubling the count, so the data that gets saved is off. For example, say someone makes a change to the third sub-record, the 'count' suddenly becomes 6, so it saves the changes for the sixth sub-record.
    Has anybody else ever seen this phenomenon and knows what causes it? I've spent three fruitless days trying to track this down so far.
    Thanks,
    Bill Ferguson
    A bit of further information.
    In my app, users must list all commodities present at a site first (different screen). They may then go to my Resources screen and input the tonnage and grades of the various commodities present. This ensures that users cannot add tonnage and grade information for a commodity that is not listed as being present at the site.
    So, when they get to the Resources screen, the bottom is all filled out with all of the commodities listed, and they simply have to type in the grade. The users also wnated the ones with information in the grade fields to appear at the top, so I had to add an order by to the query, as follows:
    SELECT a_rec,
           c_code,
           import,
           item,
           grade,
           grade_units,
           child_key,
           count_order
      FROM (SELECT rec a_rec,
                   c.commod || ' - (' || code || ')' c_code,
                   c.import,
                   item,
                   grd grade,
                   grd_units grade_units,
                   child_key,
                   rec count_order
              FROM    RESOURCE_DETAIL rd
                   RIGHT OUTER JOIN
                      commodity c
                   USING (dep_id, code)
             WHERE (CHILD_KEY = 1028244420100003)  -- actually using a variable here instead of hard-coded values
            UNION
            SELECT c.line a_rec,
                   c.commod || ' - (' || code || ')' c_code,
                   import,
                   NULL item,
                   NULL grade,
                   NULL grade_units,
                   NULL child_key,
                   c.line + 200 count_order
              FROM commodity c
             WHERE dep_id = 10282444 -- actually using a variable here instead of hard-coded values
                   AND code NOT IN
                          (SELECT code
                             FROM resource_detail
                            WHERE dep_id = 10282444 AND yr = 2010 AND line = 3)) -- actually using variables here instead of hard-coded values
    ORDER BY import, count_orderNow, on the screen the commodities are listed as:
    Copper
    Gold
    Molybdenum
    Silver
    Gemstone
    Lead
    Zinc
    Uranium
    Gypsum
    REE
    Talc
    Garnet
    But, the code I've added to see what is happening is instead saying the records being processed are in this order:
    Copper
    Garnet
    Gemstone
    Gold
    Gypsum
    Lead
    Molybdenum
    REE
    Silver
    Talc
    Uranium
    Zinc
    I do not have any sort criteria specied in the Report attributes. So, why is the order of processing (for i in 1 .. apex_application.g_f03.count) processing in a different order than what is shown on screen?

    Hi Arie,
    This was a strange one to track down. I wound up adding all kinds of logging statements in my code, writing things out to a table while processing, counts, which record, etc., and suddenly it dawne don me that everything was being processed in alphabetical order by commodity name, even though the screen display was by two other fields. I played around with different 'order by' settings, but the processing somehow was always by the commodity name. I have no idea where it was getting that 'directive', but nothing I could figure out changed it.
    So to recap, in case I didn't explain it well enough above, this is a manually created tabular form, with a 'regular' form above it (master-datail). I use the apex_item.text, etc. constructs to create the tabular form, and then in my 'proceses' I'm using the normal apex_application.g_fxx array to perform the processing. While the screen display from the tabular report shows everything with an order by of two columns, the processing always was done ordered by a diffierent, no-specified column.
    Changing my report definition to use the same 'order by' as the processing seemed to be working fixed the problem, though I have no idea where it was getting the 'order by' from to overwrite what was being on screen. I'm not sure if this is a bug or not, I vaguely remember Scott Spadafore commenting about this behaviour a long, long time back, but I can't find the post. It was probably back in the 2.x days.
    I also have no idea what is causing the array to somehow double for some records and not on others. In this particular case, the record I had on screen only had 7 commodities, but when I printed the result of apex_application.g_fxx.count, it always showed 14, even though on apex.oracle.com, when I tried to re-create the problem, it worked correctly and only reported 7. Most records in my database that I tested this on worked correctly, reporting the correct number of commodities, but occasionally I'd run across one where the number was doubled. I don't know if there is some internal table Apex uses that I could truncate (like possibly wwv_flow_collection_members?) where possisbly this type of information be kept. The only thing I can think of is that somewhere these counts are stored in a collection and it is populated with data from a real old incarnation, and during processing it stumbles across these old records and uses the old values. It doesn't seem like a realistic possibility, but it about the only explanation I can think of.
    Bill Ferguson

  • Apex_application.g_fXX and collection problem

    Hello all!
    In the midst of writing my second apex application, it appears I need to use apex_application functionality to meet my requirements and am seeking assistance.
    I have a table/report with a column link (item_id) and a second column (as a text field) (there are more columns displayed), but I think they are irrelevant to this situation) populated with a value QTY (c002) from a collection where c001 = item_id. What I'm attempting to do is allow someone to enter a qty in the c002 text field, apply the qty change to the collection and reload the page displaying the new quantity value in the report when the column link (image) is selected (page redirects to itself).
    Since it appears that column links are not a SUBMIT, I've put my collection update plsql in a before header process. According to the debug output, this collection insert is executed long before the rendering of the report.
    This is my report plsql;
    declare
    l_query varchar2(4000) := '';
    begin
    l_query := 'select i.INVENTORY_ID, col.c002, ql.QUANTITY_AVAILABLE, i.STRAIN_CODE, i.STRAIN_NAME, i.GENOTYPE, i.AGE, i.SEX, ql.ROOM_NUMBER from SM_INVENTORY i, SM_QUANTITY_LOCATION ql, apex_collections col where ql.STRAIN_ID = i.STRAIN_ID(+) and col.collection_name (+)= ''ORDER'' and col.c001 (+)= i.INVENTORY_ID';
    end;
    This is my update collection plsql (I don't have the insert part yet, but my collection already contains values);
    declare col_item_count number;
    col_seq number;
    item_id number;
    qty number;
    begin
    if apex_collection.collection_exists('ORDER') = FALSE then
    apex_collection.create_collection( p_collection_name => 'ORDER');
    commit;
    end if;
    for i in 1..apex_application.g_f01.count
    loop
    item_id := apex_application.g_f01(i);
    qty := apex_application.g_f02(i);
    select count(c001),seq_id into col_item_count, col_seq
    from apex_collections
    where c001 = item_id
    and collection_name = 'ORDER';
    group by c001, seq_id;
    if col_item_count > 0 then
    apex_collection.update_member(
    p_collection_name => 'ORDER',
    p_seq             => col_seq,
    p_c001 => item_id,
    p_c002 => qty);
    commit;
    end if;
    end loop;
    end;
    Given all this, my collection entry is not updated with the new value of c002 displayed in my report text field.
    Be advised, I've not found documentation about the apex_application package of sufficient detail to allow me to comprehend exactly what gets put into the apex_application.g_fXX values or when, but based on what I've gathered from examples/blogs, I think it contains the report in the currently rendered page, but I honestly don't know.
    Given my assumptions, I'm expecting apex_application.g_f01(1) would be the first row item_id of my report and apex_application.g_f01(2) would be the first row c002 (qty from my collection) of my report. If this is correct, I would expect this would work.
    What might I have missed?
    Thanks!
    Paul
    PS. Honestly, is this methodology the only/easiest way to get my requirement/functionality to work? Is there an easier way?

    OK, tried this - not yet successful. This is what I've got.
    Classic report loaded by;
    declare
    l_query varchar2(4000) := '';
    begin
    l_query := 'select i.INVENTORY_ID, i.INVENTORY_ID inv_id_hold, col.c002, ql.QUANTITY_AVAILABLE, i.STRAIN_CODE, i.STRAIN_NAME, i.GENOTYPE, i.AGE, i.SEX, ql.ROOM_NUMBER from SM_INVENTORY i, SM_QUANTITY_LOCATION ql, apex_collections col where ql.STRAIN_ID = i.STRAIN_ID(+) and col.collection_name (+)= ''ORDER'' and col.c001 (+)= i.INVENTORY_ID';
    end;
    Created a "SAVE" button.
    Set up column inv_id_hold as a hidden tab form element and col.c002 as a text field tab form element (item_id and qty respectively). These should now be available as apex_application.g_f01 and apex_application.g_f02 (right?).
    I have this post submit plsql in a process conditioned to the "SAVE" button.
    declare col_item_count number;
    col_seq number;
    item_id number;
    qty number;
    begin
    if apex_collection.collection_exists('ORDER') = FALSE then
    apex_collection.create_collection( p_collection_name => 'ORDER');
    end if;
    for i in 1..apex_application.g_f01.count
    loop
    item_id := apex_application.g_f01(i);
    qty := apex_application.g_f02(i);
    select count(c001),seq_id into col_item_count, col_seq
    from apex_collections
    where c001 = apex_application.g_f01(i)
    and collection_name = 'ORDER';
    --group by c001, seq_id;*
    if col_item_count > 0 then
    apex_collection.update_member(
    p_collection_name => 'ORDER',
    p_seq             => col_seq,
    p_c001 => item_id,
    p_c002 => qty);
    else
    apex_collection.add_member(
    p_collection_name => 'ORDER',
    p_c001 => item_id,
    p_c002 => qty);
    end if;
    end loop;
    end;
    When I enter something in my qty column and press SAVE, I get "ORA-01403: no data found" being thrown by the plsql process (per debug). Since everything is going on "under the hood" and there is no step debugger in apex, I'm not able to see/understand the process in action and determine where the problem is occurring.
    I got the idea for all of this here - http://apex.oracle.com/pls/otn/f?p=39839:3:5596350954563087::NO which is the shopping cart page of the online store application. But I'm trying to get the quantity edit portion to work on the inventory listing (so a customer can add items to an order simply by providing qty input for a particular line item(s) and saving).
    Any advice?
    Can you write an order processing system in apex that uses a collection to store line items?

  • Problems using apex_application.g_fxx

    I have a SQL Query (updateable report) defined on a page and am using a custom app process to process the rows. I've based my code on posts out here but I'm getting some unusual results. Here's the sql for the report.
    SELECT
    NI_PROP_SEQ_NUM,
    NEW_ITEM_SEQ_NUM,
    APPROVED_REJECTED,
    APPROVED_REJECTED_BY,
    APPROVED_REJECTED_DATE,
    PROPOSAL_DATE,
    PROPOSAL_BY,
    PROP_FLD_LKUP_SEQ_NUM,
    PROPOSAL_FIELD_VALUE,
    case
    when PROP_FLD_LKUP_SEQ_NUM = 29 then
    (select nlsn_group_num || ' - ' || nlsn_ctgry_desc from apex_so.nlsn_ctgry where PROPOSAL_FIELD_VALUE = NLSN_CTGRY_NUM)
    else PROPOSAL_FIELD_VALUE
    end PROPOSED_VALUE
    from NI_PROPOSALS
    where NEW_ITEM_SEQ_NUM = :P2_NEW_ITEM_SEQ_NUM
    The report works fine on the page but when I try to process it using the following the values in the corresponding report don't align and is some cases I can't figure out where the values came from. Here's the code from the app process.
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    :P2_RETURN_MESSAGE := 'This is a test, count = ' || apex_application.g_f01.COUNT;
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vrow := apex_application.g_f01 (i);
    :P2_RETURN_MESSAGE := 'Inside the loop '
    || '. f01->'
    || apex_application.g_f01 (i)
    || '. f02->'
    || apex_application.g_f02 (i)
    || ' / f03->'
    || apex_application.g_f03 (i)
    || ' /f04-> '
    || apex_application.g_f04 (i)
    || ' / f05->'
    || apex_application.g_f05 (i)
    || ' / f06->'
    || apex_application.g_f06 (i)
    || ' / f07->'
    || apex_application.g_f07 (i);
    /* || ' / f08>'
    || nvl(apex_application.g_f08 (i), ' ');
    || ' / f09>'
    || nvl(apex_application.g_f09 (i), ' ')
    || ' / f10->'
    || nvl(apex_application.g_f10 (i), ' ')
    || ' / f11->'
    || nvl(apex_application.g_f12 (i), ' ')
    || ' / f12->'
    || nvl(apex_application.g_f12 (i), ' '); */
    END LOOP;
    END;
    There are 10 fields being selected in the sql above but if I try to concatenate more than g_f07 I get ora-1403 errors, data not found. None of these columns are null and I can't figure it out.
    Anyone have any thoughts?
    Thanks,
    Bruce

    Hi Bruce,
    is it possible that some of the columns are just of display type "Standard report column"? Because those will not save state.
    For an explanation of the apex_application.g_fxx array mapping, have a look at http://inside-apex.blogspot.com/2007/03/which-tabular-form-column-is-mapped-to.html
    Patrick
    *** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

  • [Solved] Reference apex_application.g_fXX in "execute immediate" statement

    Hi!
    I created a dynamically generated tabular form - the number of columns is not known in advanced. Each cell of the form is a text item generated with apex_item.text().
    I want to write an after-submit process that saves the values from the form into a database table. In this process I already know how many columns there are in the report so I want to do the following:
    --for each row...
    for i in 1..apex_application.g_f01.count loop
      -- and for each column in that row (number of columns is in v_col_count)
      for j in 1..v_col_count loop
        -- get the value of text item
        v_query := 'select apex_application.g_f0' || j || '(' || i || ')' || ' from dual';
        execute immediate v_query into v_value;
        -- now do some DML with v_value
      end loop;
    end loop;The problem is that I get an error: ORA-06553: PLS-221: 'G_Fxx' is not a procedure or is undefined where xx is the number from the generated query.
    My question is - am I doing something wrong or is is just not possible to reference apex_application.g_fxx in "execute immediate"? Will I have to manually check for all 50 possibilites of apex_application.g_fxx? Is there another way?
    TIA,
    Jure

    Well now I know what was wrong and what you were trying to tell me - apex_application.g_fxx is not visible in "plain" SQL. And now I also have a solution to this problem. The point is to wrap the select statement with begin - end block so that the statement is rendered as pl/sql:
    --for each row...
    for i in 1..apex_application.g_f01.count loop
      -- and for each column in that row (number of columns is in v_col_count)
      for j in 1..v_col_count loop
        -- get the value of text item
        v_query := 'begin select apex_application.g_f0' || j || '(:i)' || ' into :x from dual; end;';
        execute immediate v_query using i, out v_value;
        -- now do some DML with v_value
      end loop;
    end loop;This works great :).
    Jure

  • Hi team , I have some questions/Problem for my product apple (iPad,iPhone) , I want to employee speak and type thai language

    Hi team , I have some questions/Problem for my product apple (iPad,) , I want to employee that can  speak  or response me in thai language
    1. ผม อาคเนย์  พำนักอยู่ประเทศไทย กรุงเทพฯ  มีปัญหาสอบถาม ดังต่อไปนี้
       - กระผมได้ทำการตัดบัตร เครดิต เพื่อซื้อเกมส์ผ่าน itune store ผ่าน apple itune ID : misskor.yaprom@*** เพื่อซื้อเกมส์ Eleves Realm ในวันที่18 ก.ค. 56 เวลา 17.07น. ซึ่งทางบัตรเครดิตได้แจ้งเรียกเก็บเงินมายอดเงิน 39.99$ ซึ่งในระบบจริงๆ ทางกระผมต้องการตัดในยอด 99.99$ แต่พอได้ประสานงานไปยังธนาคาร ได้รับการแจ้งกลับมาว่า ได้ทำการตัดบัตรในยอดเงิน 39.99$ ซึ่งในความเป็นจริงนั้น กระผมไม่ได้สั่งซื้อเกมส์ในยอด 39.99$ ซึ่งในยอด 99.99$ นั้นพยายามตัดในระบบบัตรเครดิตอยู่ แต่ทางกระผมได้ยืนยันกลับไปว่าไม่ให้ระบบตัดนะครับ เพราะว่าเนื่องจากมีปัญหาในการชำระเงินระหว่าง Apple itune store อยู่
       - ทั้งนี้ขอให้ทางเจ้าหน้าที่ประสานงานตรวจสอบ apple itune ID : misskor.yaprom@*** เพื่อซื้อเกมส์ Eleves Realm ตามที่ได้ให้รายละเอียดโดยด่วนว่าเป็นเพราะว่าระบบมีปัญหาหรือว่ามีอะไรเกิดขึ้นในข ั้นตอนการชำระเงินครับ
    รบกวนประสานงานกลับมายังกระผม อาคเนย์ ที่หมายเลขโทรศัพท์มือถือ +**** / reply feedback  email : lekod1@*** โดยด่วน ในวันศุกร์ที่ 19 ก.ค. 2556 ครับ
    ขอบคุณครับ
    อาคเนย์  อุดปิน
    กด
    <Edited By Host>

    Google translation:
    พนักงานของ iTunes Store จะไม่ได้อ่านข้อความในเว็บบอร์ดนี้ ถ้าคุณต้องการความช่วยเหลือสำหรับปัญหาที่มีใน iTunes Store, คุณจะต้องติดต่อกับพวกเขาผ่านทางแบบฟอร์มเว็บนี้:
    http://www.apple.com/emea/support/itunes/contact.html

  • Question / problems with the Toshiba TV 40TL938 (40TL938F)

    Hi everybody,
    I bought the Toshiba TV 40TL938 french version ( 40TL938F ), in an online store.
    I have a few question / problem, and i hope you could help me.
    - when i play MKV vido files via USB, integrated subtitles works well but for me they are too small, too thin and too white. Can i make them biger, larger and with a black shadow around it ? if yes, how could i do this ?
    - when i play MKV vido files via DLNA (with XBMC), there is no subtitles anymore. Whose fault is it ? my TV ? XBMC ? do you how i can fix this ?
    - does anybody know if DTS will be supported sooner or later on 2012 toshiba TV models such as my 40TL938
    Thank you very much by advance for your help !
    Backslash
    French user of a beautiful Full HD 3D 40 inches toshiba LED TV :)

    > {quote:title=TomDexter wrote:}{quote}
    > > when i play MKV vido files via USB, integrated subtitles works well but for me they are too small, too thin and too white. Can i make them biger, larger and with a black shadow around it ? if yes, how could i do this ?
    >
    > User manual page 76:
    > http://www.toshiba-om.net/LCD/PDF/English/TL938-4046-English.pdf
    > You will need to check the option: +Subtitle Type+
    Hi !
    Thank you for your answer,
    I saw this but there is no way to change the subtitle setting.
    In "subtitle type" the only thing i can do is to swich from "normal" to "deaf and hearing impaired" ("sourd et malentendant" in french).
    So i guess i will have to get used to it
    Anyway, thank you for your help !
    > {quote:title=donhe7 wrote:}{quote}
    > BACKSLASH ASKS " does anybody know if DTS will be supported sooner or later on 2012 toshiba TV models such as my 40TL938?"
    >
    > Please excuse my ignorance, but what is "DTS"???
    >
    > donhe7
    DTS is an audio format, such as AC3 or mp4. This TV doesn't support DTS, so when i play movie (such as MKV file) with audio in DTS, there is no sound (but the video is ok).

  • Counting lines problem. Please help!!

    Hi all,
    I just have a small problem i cannot resolve, here it is: I read through a file and i like to count the lines of the file there is before a special word.
    E.g
    My file contains:
    "hi
    how are you
    my name is john
    and i live
    britain"
    I'd like to count how much lines there are in the file before the word LIVE ==> result would be 4.
    I proceed with StreamTokenizer, but i don't knor how to specify the word. Here is my code:
         try {FileReader fr = new FileReader("test2.dat");
                   BufferedReader br = new BufferedReader(fr);
                   StreamTokenizer stk = new StreamTokenizer(br);
                   do {
                   n = stk.nextToken();
                   li = stk.lineno();
                   if (n == stk.TT_NUMBER) {
                        n = stk.nextToken();
                   if (n == stk.TT_EOL) {
                        li++;
                        n = stk.nextToken();
                   if (n == stk.TT_WORD) {
                        String str = stk.sval;
                        if ("entier".equals(str)) {
                             System.out.println(li);
                        else {
                             n = stk.nextToken();
                   while (??????????????);
    I want here to specify the word "entier" but how to do this??
    Thanks very much for your precious help....

A: Counting lines problem. Please help!!

Use LineNumberReader, which counts lines for you. Here's a complete program in 16 lines:
import java.io.*;
public class test4 {
  public static void main(String[] argv) {
    if (argv.length < 2) { System.err.println("no arg"); System.exit(0); }
    try {
      LineNumberReader in = new LineNumberReader(new FileReader(argv[1]));
      String line;
      while((line = in.readLine()) != null)
        if (line.indexOf(argv[0]) != -1)
          System.out.println("Found match at line " + in.getLineNumber());
    } catch (IOException e) {
      e.printStackTrace();
}If you want case insensitivity, you can make both lines lower-case before searching. Or you can use regular expressions.

Use LineNumberReader, which counts lines for you. Here's a complete program in 16 lines:
import java.io.*;
public class test4 {
  public static void main(String[] argv) {
    if (argv.length < 2) { System.err.println("no arg"); System.exit(0); }
    try {
      LineNumberReader in = new LineNumberReader(new FileReader(argv[1]));
      String line;
      while((line = in.readLine()) != null)
        if (line.indexOf(argv[0]) != -1)
          System.out.println("Found match at line " + in.getLineNumber());
    } catch (IOException e) {
      e.printStackTrace();
}If you want case insensitivity, you can make both lines lower-case before searching. Or you can use regular expressions.

  • Counter retrigger problem

    Hi, I am having a problem with counters on a USB-6211.
    I'm trying to retrigger a counter (start the lowticks running again) before the highticks have finished with the current pulse.
    I need to do this to allow me to position a lamp flash drive signal over a datum signal from a rotating shaft (think timing lamps and engines).
    I would take the easy way out and use 2 counters to do this but I need the 2nd counter (my device only has 2) to measure the period of rotation!
    I've attached an example VI to show the problem.
    If you choose to put the output pulse anywhere other than over the trigger signal, it works fine. As soon as I try to position my output pulse over the trigger signal I only get an output once every 2nd rotation.
    I need to tell the DAQ card to accept a trigger signal to start lowticks running before it's finished outputting highticks. I'm guessing each counter must actually be 2 counters internally (one for lowticks and one for highticks).
    (You might need a scope to see the problem on the output)
    Any help greatly appreciated!
    Attachments:
    Counter Retrigger Problem.vi ‏34 KB

    Looks like there is a way to do this with the PCI-6602, but I'm not sure if it works with the USB-6211:
    Using One Counter to Generate a Retriggerable Finite Digital Pulse Train with a PCI-6602 and DAQmx
    http://digital.ni.com/public.nsf/allkb/4A9AF19480E50C6D862571B70058142A
    www.movimed.com - Custom Imaging Solutions

  • CFINSERT - Question Problem

    Have a set of questions in which a person answers...
    It works fine looping thru the questions... And inserting...
    Problem occurs - when I want them to go back and answer the ones that were 'No'...
    So it might only be 3 questions instead of 10...
    So that is where my loop errors...
    As it is based on a Question ID
    Yes<br><cfinput type="Radio" name="answer_2" value="Yes" required="yes">
    Yes<br><cfinput type="Radio" name="answer_4" value="Yes" required="yes">
    Yes<br><cfinput type="Radio" name="answer_5" value="Yes" required="yes">
    An example of what is being sent above...
    So 2, 4, 5 are the questions...
    My loop goes through 3 of them which is fine...
    But mismatches - thinking it should be 1,2,3 etc..
    Yes<br><cfinput type="Radio" name="answer_1" value="Yes" required="yes">
    Yes<br><cfinput type="Radio" name="answer_2" value="Yes" required="yes">
    Yes<br><cfinput type="Radio" name="answer_3" value="Yes" required="yes">
    So not sure what to do to code it as looping through the actual answer numbers...
    Some code below...
    <cfloop from="1" to="#q#" index="n">   ---> q is a record count of wrong answers
    <cfoutput>
    <!--- first we set up field names to match what the form should be passing. --->
    <cfset newqid = "#variables.n#"> #newqid# (test output)
    <cfset newanswer = "answer_"&#variables.n#> #newanswer# (test output)
    <cfset newnotes1 = "notes1_"&#variables.n#> #newnotes1# (test output)
    <cfset newnotes2 = "notes2_"&#variables.n#> #newnotes2# (test output)
    <cfset newcnote = "compliancenote_"&#variables.n#>  #newcnote#(test output)
    <br>
    <!--- then we get whatever values are in those field names and set them as vars --->
    <cfset qid = "#Evaluate(variables.newqid)#"> #qid# (test output)
    <cfset answer = "#Evaluate(variables.newanswer)#"> #answer#
    <cfset notes1 = "#Evaluate(variables.newnotes1)#"> #notes1#
    <cfset notes2 = "#Evaluate(variables.newnotes2)#"> #notes2#
    <cfset compliancenote = "#Evaluate(variables.newcnote)#"> #compliancenote#
    <cfset inspid = "#Evaluate(inspid)#"> #inspid#
    <cfset busid = "#Evaluate(busid)#"> #busid# 
    <cfquery name="insert" datasource="fpb">
            INSERT INTO answer (qid, answer, inspid, busid, notes1, notes2, compliancenote)
            VALUES (#qid#, '#answer#', #inspid#, #busid#, '#notes1#', '#notes2#', '#compliancenote#');
    </cfquery>
    </cfoutput>
    </cfloop>
    This all works fine when just inserting fresh from start say 10 questions...
    Which can be yes no etc...
    Thanx for any help...
    Merle

    Damn...
    It is late at night... Rum and EggNog...
    I can't seem to set this output...
    This works...
    <cfoutput query="reinspect">
    #qid#,
    </cfoutput>
    Goes ---> 2,5,8,9, (example - comma is stuck on end)
    My problem is probably below...
    <cfset numbers = "
    <cfoutput query="reinspect">
    #qid#,
    </cfoutput> ">

  • Dictionary, Table, Counter Question

    Hi,
    I'm trying to create a special customer table (SE11) with the following fields and have question regarding TYPE etc:
    Fields of table
    CUST_ID    
    CUST_NAME
    CUST_DESC
    1. CUST_ID should work as a counter (increment by 1 every time.) What kind of TYPE should I use ?
    (How do i do the increment stuff...)
    2. CUST_DESC should be able to take approx 5 kb of data and be searchable in WHERE clause. What kind of TYPE should I use ?
    3. Is there any advantages of creating/using Data Element instead of Build-in type ?
    //Martin
    Message was edited by: Martin Andersson

    Hi Martin,
    1. SE11 will help you only to create a table, but not to add any special functionality (as far as i have known) the CUST_ID can be made as counter only by programming. while moving data use a variable to get the previous maximum CUST_ID value from the tabel and increment it before you insert the value into the table.
    2. To give long descriptions declare the CUST_DESC as LCHR or LRAW types, i am not sure whether it will hold 5kb of data. Then searching for a particular word will not be a problem  you can use,
    SEARCH <c> FOR <str> <options>.
    <option> in the SEARCH FOR statement can be any of the following:
    ABBREVIATED
    STARTING AT <n1>
    ENDING AT <n2>
    AND MARK
    can be used to find the required word.
    3. I think this is what you meant -  if a data element is created by a domain, the technical attributes of the domain are inherited by data elements and these domains can be used by any number of data elements, besides you can also create data elements by refering to the existing data elements using 'TYPE'.
    Hope this helps.
    Regards,
    Kathirvel

  • Noob Question: Problem with Persistence in First Entity Bean

    Hey folks,
    I have started with EJB3 just recently. After reading several books on the topic I finally started programming myself. I wanted to develop a little application for getting a feeling of the technology. So what I did is to create a AppClient, which calls a Stateless Session Bean. This Stateless Bean then adds an Entity to the Database. For doing this I use Netbeans 6.5 and the integrated glassfish. The problem I am facing is, that the mapping somehow doesnt work, but I have no clue why it doesn't work. I just get an EJBException.
    I would be very thankfull if you guys could help me out of this. And don't forget this is my first ejb project - i might need a very detailed answer ... I know - noobs can be a real ....
    So here is the code of the application. I have a few methods to do some extra work there, you can ignore them, there are of no use at the moment. All that is really implemented is testConnection() and testAddCompany(). The testconnection() Methode works pretty fine, but when it comes to the testAddCompany I get into problems.
    Edit:As I found out just now, there is the possibility of Netbeans to add a Facade pattern to an Entity bean. If I use this, everythings fine and it works out to be perfect, however I am still curious, why the approach without the given classes by netbeans it doesn't work.
    public class Main {
        private EntryRemote entryPoint = null;
        public static void main(String[] args) throws NamingException {
            Main main = new Main();
            main.runApplication();
        private void runApplication()throws NamingException{
            this.getContext();
            this.testConnection();
            this.testAddCompany();
            this.testAddShipmentAddress(1);
            this.testAddBillingAddress(1);
            this.testAddEmployee(1);
            this.addBankAccount(1);
        private void getContext() throws NamingException{
            InitialContext ctx = new InitialContext();
            this.entryPoint = (EntryRemote) ctx.lookup("Entry#ejb.EntryRemote");
        private void testConnection()
            System.err.println("Can Bean Entry be reached: " + entryPoint.isAlive());
        private void testAddCompany(){
            Company company = new Company();
            company.setName("JavaFreaks");
            entryPoint.addCompany(company);
            System.err.println("JavaFreaks has been placed in the db");
        }Here is the Stateless Session Bean. I added the PersistenceContext, and its also mapped in the persistence.xml file, however here the trouble starts.
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(mappedName="Entry")
    public class EntryBean implements EntryRemote {
        @PersistenceContext(unitName="PersistenceUnit") private EntityManager manager;
        public boolean isAlive() {
            return true;
        public boolean addCompany(Company company) {
            manager.persist(company);
            return true;
        public boolean addShipmentAddress(long companyId) {
            return false;
        public boolean addBillingAddress(long companyId) {
            return false;
        public boolean addEmployee(long companyId) {
            return false;
        public boolean addBankAccount(long companyId) {
            return false;
    }That you guys and gals will have a complete overview of whats really going on, here is the Entity as well.
    package ejb;
    import java.io.Serializable;
    import javax.persistence.*;
    @Entity
    @Table(name="COMPANY")
    public class Company implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column(name="COMPANY_NAME")
        private String name;
        public Long getId() {
            return id;
        public void setId(Long id) {
            this.id = id;
       public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
            System.err.println("SUCCESS:  CompanyName SET");
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (id != null ? id.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Company)) {
                return false;
            Company other = (Company) object;
            if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "ejb.Company[id=" + id + "]";
    }And the persistence.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="PersistenceUnit" transaction-type="JTA">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <jta-data-source>jdbc/sample</jta-data-source>
        <exclude-unlisted-classes>false</exclude-unlisted-classes>
        <properties>
          <property name="toplink.ddl-generation" value="create-tables"/>
        </properties>
      </persistence-unit>
    </persistence>And this is the error message
    08.06.2009 10:30:46 com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNUNG: ACC003: Ausnahmefehler bei Anwendung.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
            at ejb.__EntryRemote_Remote_DynamicStub.addCompany(ejb/__EntryRemote_Remote_DynamicStub.java)I spend half the night figuring out whats wrong, however I couldnt find any solution.
    If you have any idea pls let me know
    Best regards and happy coding
    Taggert
    Edited by: Taggert_77 on Jun 8, 2009 2:27 PM

    Well I don't understand this. If Netbeans created a Stateless Session Bean as a facade then it works -and it is implemented as a CMP, not as a BMP as you suggested.
    I defenitely will try you suggestion, just for curiosity and to learn the technology, however I dont have see why BMP will work and CMP won't.
    I also don't see why a stateless bean can not be a CMP. As far as I read it should not matter. Also on the link you sent me, I can't see anything related to that.
    Maybe you can help me answering these questions.
    I hope the above lines don't sound harsh. I really appreciate your input.
    Best regards
    Taggert

  • Question/Problem Sharing iTunes Library between multiple users

    Hello all,
    I have a question (potential problem) regarding sharing an iTunes Library between multiple users.
    In the past, I had placed the iTunes folder in /Users/Shared, and created an alias to it in the "Music" folder of each user, and it worked fine.  However, with a recent upgrade to Mac OS 10.5, only the Home user account can access the library. 
    I read the Apple Support Document http://support.apple.com/kb/ht1203 uner Mac OS X which specifically states *not* to move the iTunes folder, just the iTunes Media folder (which I don't have, would that be iTunes Music?).
    Any recommendations?  Should I delete the different alias, move the iTunes folder back to the home user, and then follow the instructions in the support document?
    We're also looking to sync music purchsed on our iPod touches, as well as apps (which weren't supported in our privous Mac OS X version.
    Any advice is appreiciated.

    David Guay wrote:
    ... iTunes Media folder (which I don't have, would that be iTunes Music?).
    yes.
    specifically states *not* to move the iTunes folder
    *do* keep the entire iTunes folder in /users/shared, however, instead of creating aliases, launch iTunes while holding the option (⌥) key, click choose library when prompted, and select the iTunes folder in /users/shared.
    obviously, only one iTunes at a time can access the library !

  • Table question/problem

    This is an html table question, but since I am working with
    CF on this, I thought I would post here for help.
    I query and cfoutput the data in a table. The table has ten
    columns. The first five are alpha numeric and the last five are
    numeric. The output displays fine.
    What the want to do now is to put a black border around the
    number columns, the last five.
    I tried to make each column its own table, but that just puts
    a box around each value, the columns are not connected.
    How can I do this ?
    Thanks for helping.

    Put a thin black left border in the sixth column and a
    similar right border in the tenth (last) column.
    It is neater and advisable to use CSS.
    <style type="text/css">
    <!--
    .bdrLft {
    border-left-color:#000000;
    border-left-width:thin;
    -->
    </style>
    <td class="bdrLft">
    The inline formatting will look like:
    <td style="border-left-color:##000000;
    border-left-width:thin;">
    Do the same for the top border (last 5 column headers). The
    bottom border may be trickier. The idea is to apply bottom border
    at the last query count. One can do without the top and bottom
    borders, however.

  • Shutter count question

    Does anyone in the forum know how I can determine the shutter count I have logged on my T3i? The camera is still going strong without any problems at all (except for a few dead pixels that appear as tiny red spots in some images). I am mostly just curious about this. Is there any indication how many shutter releases the average T3i can be expected to fire? My T3i is my first dslr and it has served that role fabulously.

    As Tim mentioned, there's Shuttercount.  But many other programs (that many camera owners already have) can give you the count as well.  If all you want is the count then Shuttercount is probably the easiest, but it's good to have options:
    Magic Lantern: Third party add-on for your camera.  Free, but you install a firmware add-on onto your camera.  Best to know what you're doing before installing.  Again, if you just want the count there are better options.
    DSLR Controller: An app for controlling your camera from a smart phone or tablet.  Fantastic app, but it costs $10.  I wouldn't spend it for just count, but the app itself is awesome if you want to control your camera remotely.
    FoCal: A program for fine tuning your cameras autofocus.  Unfortunately doesn't work with your camera, but most people who have fine-tunable cameras already own this so I thought I'd mention it.
    APT: An astrophotography tool.  There's a free trial for download that should tell you shutter count.  Can't say I've tried it.

  • Maybe you are looking for

    • I have a 3gs, thats was "upgraded" with iPad software. No Longer Works

      excuse my untech saviness when I write this: I have a 3GS, it was jailbroken for me, but not only that, it was running on Ipad software. I was told the reason was at the time there werent any hacks for the 3GS software due to the 4 being out and the

    • Cancellation of inspection lot

      Hi PP & QM gurus,           I want to cancell the stock posting after GR from production. and stock posting is done by QM. I have activated inspection type 04 in M Master. and then after production confirmation system creates an inspection lot and i

    • How can I get rid of iOS 7?

      How can I get rid of iOS 7?

    • The difference of stop or disable propagation

      Hi Experts, I want to stop bi direction between 2 server. there are 2 procedure. stop_propagation and disable_propagation. Which different between stop_propagation and disable_propagation? Thanks, Jimmy

    • HT5429 How do I view Apple Maps on Windows and Mac?

      Apple must be smoking something good if they think Apple Maps can be improved without allow users of Mac OS, Linux and WIndows computers see and edit the maps somehow. Which raises the question: how do I edit my Apple maps listing? On Google Maps it