Bizarre CFIF issue with dynamic form variables? Very strange...

I can't figure out what I'm doing wrong here.  Here's my code.  Issue explained below.
            <cfquery name="reviewconfigloader" datasource="MOLMS">
            SELECT *
            FROM dbo.BaseModel
            WHERE dbo.BaseModel.AccountID = #molmsAccountID# AND.dbo.BaseModel.basemodelActive = 1
            </cfquery>
      <table width="100%" border="0" cellspacing="0" cellpadding="3">
        <cfloop query="reviewconfigloader"><cfif isdefined("form.baseconfig#reviewconfigloader.basemodelID#") AND ("form.baseconfig#reviewconfigloader.basemodelID#") NEQ "" AND ("form.baseconfig#reviewconfigloader.basemodelID#") NEQ 0><cfoutput><tr>
          <td width="40%" bgcolor="##F7F7F7" class="basemodelsub">     #form['baseconfig#reviewconfigloader.basemodelID#']#  #reviewconfigloader.basemodelName# #reviewconfigloader.basemodelSubName#</td>
          <td width="15%" bgcolor="##F7F7F7" class="basemodelsub"><div align="center">x 14 </div></td>
          <td width="15%" bgcolor="##F7F7F7" class="basemodelsub"><div align="center">$486/yr</div></td>
          <td width="15%" bgcolor="##F7F7F7" class="basemodelsub"><div align="center">$1444/yr</div></td>
          <td width="15%" bgcolor="##F7F7F7" class="basemodelsub"><div align="center">$1444/3 yr</div></td>
        </tr></cfoutput></cfif></cfloop>
      </table>
What I'm doing here is fairly basic.I'm running a query with a number of configs in it...and then creating a loop to output them.  Ultimately, I only want the configurations that didnt have 0 submitted in the form on the previous page.  Each one of the configs in the config query has a dynamic form variable on the previous page with a quantity tied to it.  I am trying to eliminate all quantities past that aren't 0 (or not eliminate, just not show)...as you can see from the cfif statement.
Here's where it gets weird.  You'll notice I output #form['baseconfig#reviewconfigloader.basemodelID#']#, just for testing, which shows me the quantity as it should.  I ran a test and put in a couple of 1s, 0s, 12s, 6s, etc in the form fields on the previous page.  If this thing worked, it wouldnt show anything for any of the records with their basemodelID value being submitted as 0.  Not the case.  It shows all records.  What is more hilarious is that it outputs perfectly in my test #form['baseconfig#reviewconfigloader.basemodelID#']#, showing the correct numbers entered in the previous form, the 1s, the 0s, etc, tied to each record.  But for whatever reason, the cfif code isn't catching it.
What's even more bizarre...I replaced the cfif ("form.baseconfig#reviewconfigloader.basemodelID#") NEQ 0 with GT 12 (12 was the highest number that I put in the form) and it still showed all records.  Then I put it in as LT 12 and it showed nothing.  I decided  to take it one step further and put it in for GT 1231243242343 (random massive number), which it still showed all of the records.  So somehow, my CFIF statement thinks that  ("form.baseconfig#reviewconfigloader.basemodelID#") is a incredibly large number, although when I output it in the row below, it is the number it should be.
I'm stumped.  Any ideas?  Thanks in advance!!

Hey Dan...thanks....unfortunately...with the cfif testing, thats kinda what I'm
doing because I dont have an "expected" value.  My expected value is anything a user inputs thats greater than zero, hence NEQ 0 and NEQ "". The real problem is taht what I'm outputting works and what the cfif clause is seeing is obviously very different.
As far as your comment about looping out the variables and then setting a query equal to the value in a cfquery, remember...these are form objects and therefore nothing can be tied back to the database.  The result from the code is establishing a form variable (example.... form.basemodel1 (if 1 was the basemodelID from the database query) so it can capture whatever data the user has passed from the previous page in a text input.  So that input could have been 23, it could have been 1053.
So really the only way to do it is create a query and loop out the variables.... and attach them to form objects (basemodel1, basemodel2, basemodel3 etc where the 1,2 and 3 are the unique ID's for those models in the database), and then look for where those form objects may have been filled in in the previous page by stating IF this form object not equal to 0 or "", output the data.
Does that make sense?  Thanks for the help guys I'm completely stumped by this.  I've done this a million times with CFIF and I'm really struggling with why this isnt working....
JE    

Similar Messages

  • I have a serious (and bizarre!) issue with my novation impulse (Although i've tried it with two other keyboards and i still have the same problem) and its compatibility with mainstage 3

    i have a serious (and bizarre!) issue with my novation impulse (Although i've tried it with two other keyboards and i still have the same problem) and its compatibility with mainstage 3.
    the problem is best explained on the following one - page thread: 
    https://discussions.apple.com/thread/3951518?start=0&tstart=0
    (Clearly i'm not alone in this problem, although i think i figured out what's going wrong a little more than he did...read on!)
    his solution, to put mainstage in jump mode, is very unsatisfactory to me, as it bounces all of a sudden to drastically different settings.
    basically, my analysis is that my controller is NOT receiving MIDI date from mainstage.  in other words, mainstage knows what my controller is doing, but my controller doens't know what mainstage is doing.
     let's say i turn the knob all the way to the right ... 127...and the virtual fader goes to the right like it's supposed to. 
    now...next...let's say i change to a different patch, where that same VIRTUAL fader is not at the max clockwise position..maybe it's only at 1pm.  now when i turn the physical knob to the RIGHT, the midi data is still at 127 on the controller!  it didn't "reset" to sync up with the new level (say 80 or so) setting on the new patch.  so i can't increase that new setting of 80 by continuing to turn the knob to the right.  i have to turn it all the way to zero,...and then continue PAST zero until the controller thinks that IT is at 0...at that point the controller and mainstage are in agreement, and things work fine....so bascially, the keyboard thinks the level is at max...but mainstage thinks the level is at 1pm.
    i am using Logic 9, and i have a macbook pro 2.9 Ghz I7 with 8 gigs of memory and OS X 10.8.4

    Hi Josh,
    Thanks for taking the time to contact us here a Novation for technical support. Lets continue to correspond via email so we can get your issue resolved.
    Thanks.
    Mike Towns

  • Issue with Dynamic Link with Premiere CC and After Effects

    I'm having a strange and annoying issue with Dynamic linked clips in Premiere CC:
    When I render or export my timeline the progress will stall when it hits a dynamic linked clip.  It will stay stalled until I click the After Effects application and make it the active window.  Once that happens the render/export resumes at normal speed. 
    This is annoying as I can't start a render and walk away or work on different windows, I have to babysit all the renders to make sure they go through.
    Has anybody experienced this and know of any solutions? 
    I'm running the latest version of Premiere (7.2.1) and After Effects 12.2.0.52 on Mavericks 10.9.1 with a GTX 770 Video Card.

    Does it still pause if AE is closed completely? I often experience slower AME renders from Premiere over dynamic link material when AE is open. Closing AE speeds things up. Go figure.

  • Panel with dynamic form

    I need to create panels with dynamic forms. Why does my application will have various forms and if I have to create a lot of forms it will take too long to complete my application.
    Can anyone help me?

    So my idea is as follows ...
    I need to create various forms, actually I wanted to create a scheme where the forms to adopt the characteristics defined by me.
    <s:Panel width="350">
                <mxml:CustomForm dataConfig="{dataConfig1}" width="100%" />
    </ S: Panel>
    Yo I'm adding the inputbox, LABES and buttons on the panel through the
    dataConfig1 = new ArrayCollection ([
                        (Label: 'Name', message: 'Invalid name', validateType 'noblank', id: 'name', text: 'Pedro Claudio', required: true),
                        (Label: 'Mail', message: 'Invalid Email' validateType: 'email', id: 'email', text:'', required: true)
    I wonder if this is the easiest way to create the forms?
    How does this business of the panels child?

  • Xcelsius Engage: Issue with dynamic visibilty of data in dashboard

    Hi,
    We have a requirement for a dashboard where data for 5 Sites need to be displayed as per 17 KPIs and 12 different rolling months.
    Raw sample data looks like below-
    SITE  KPI        ActYTD  Act(Pre Month) PlanYTD  Plan(Prev Month)  VarianceYTD Variance(Pre Month)
    A       On-Time   76.7         82.92                  111.50       109.50             -1                    -1
    B       Delay       73.70       80.00                   79.75        77.75             -1                     1
    There are 5 different Sites and 17 different KPIs.
    Based on the raw data that we get from BI (7.0 query output), we manipulate it in MS excel, using some lookups and formulae to obtain certain values, store them in designated sheets and then Xcelsius (different components) use these sheets as source.
    We are having three levels of navigation-
    1. Main screen listing all KPIs site wise and months ( the site and months could be selected from Combo boxes at the top). The KPIs are bind to a list view, each row is a selectable KPI leading to level two navigation.
    2. Level two contains the details for each KPI ( values and trend chart). Selection in the chart for a Site leads to level 3 navigation.
    3. Level 3 screen contains data by KPI and by Site for 12 rolling months ( The sites could be changed from a drop-down).
    There are custom navigation buttons (home/back) to enable navigations between the screens.
    We are using 3 panel containers, 2 list views, 4-5 combo boxes and some hidden button ( with dynamic visibilty).
    The workbook has 8-9 different sheets, though the Xcelsius componets are bound to only 3 sheets.
    Things work fine till we select 14th KPI , but Xcelsius starts behaving awkwardly when we select 15th KPI and further.For the selected KPI, the level two screen would load for a flash of a second and then the control comes back to level 1 screen. We do not face this issue till 14th KPI.
    In-order to eliminate possibiltes we did the following-
    1. Changed the order of KPIs - issue persists
    2. Changed the Excel option " Max. no of Rows" to 4000- issue persists
    3. Decreased the amount of data to be loaded - issue persists ( though at max we are loading data for 2000 rows)
    4. Decreased the no. of KPIs to 14 in level 1 list view - all works fine.
    We have not noticed any gradual decrease in performance/load time till 14th KPI but everything goes for a toss when the 15th KPI is displayed.
    We are on the latest Xcelsius patch ( patch 3).
    We would appreciate any pointers/help to resolve this issue.
    Thanks in advance for your time.
    Best Regards,
    Bansi.

    How many total rows are you dealing with in your spreadsheet?
    -Dell

  • Performance issues with query input variable selection in ODS

    Hi everyone
    We've upgraded from BW 3.0B to NW04s BI using SP12.
    There is a problem encountered with input variable selection. This happens regardless of using BEx (new or old 3.x) or using RSRT. When using the F4 search help (or "Select from list" in BEx context) to list possible values, this takes forever for large ODS (containing millions of records).
    Using ST01 and SM50 to trace the code in the same query, we see a difference here:
    <u>NW04s BI SQL command</u>
    SELECT                                                                               
    "P0000"."COMP_CODE" AS "0000000032" ,"T0000"."TXTMD" AS "0000000032_TXTMD"                             
    FROM                                                                               
    ( "/BI0/PCOMP_CODE" "P0000" ) LEFT OUTER JOIN "/BI0/TCOMP_CODE" "T0000" ON  "P0000"."COMP_CODE" = "T0000
      "."COMP_CODE"                                                                               
    WHERE                                                                               
    "P0000"."OBJVERS" = 'A' AND "P0000"."COMP_CODE" IN ( SELECT "O"."COMP_CODE" AS "KEY" FROM              
      "/BI0/APY_PP_C100" "O" )                                                                               
    ORDER BY                                                                               
    "P0000"."COMP_CODE" ASC#                                                                               
    <u>BW 3.0B SQL command:</u>
    SELECT ROWNUM < 500 ....
    In 3.0B, rownum is limited to 500 and this results in a speedy, though limited query. In the new NW04s BI, this renders the selection screen unusable as ABAP dumps for timing out will occur first due to the large data volume searched using sequential read.
    It will not be feasible to create indexes for every single query selection parameter (issues with oerformance when loading, space required etc.). Is there a reason why SAP seems have fallen back on a less effective code for this?
    I have tried to change the number of selected rows to <500 in BEx settings but one must reach a responsive screen in order to get to that setting and it is not always possible or saved for the next run.
    Anyone with similar experience or can provide help on this?

    here is a reason why the F4 help on ODS was faster in BW 3.x.
    In BW 3.x the ODS did not support the read mode "Only values in
    InfoProvider". So If I compare the different SQL statements I propose
    to change the F4 mode in the InfoProvider specific properties to
    "About master data". This is the fastest F4 mode.
    As an alternative you can define indexes on your ODS to speed up F4.
    So would need a non-unique index on InfoObject 0COMP_CODE in your ODS
    Check below for insights
    https://forums.sdn.sap.com/click.jspa?searchID=6224682&messageID=2841493
    Hope it Helps
    Chetan
    @CP..

  • Performance issues with dynamic action (PL/SQL)

    Hi!
    I'm having perfomance issues with a dynamic action that is triggered on a button click.
    I have 5 drop down lists to select columns which the users want to filter, 5 drop down lists to select an operation and 5 boxes to input values.
    After that, there is a filter button that just submits the page based on the selected filters.
    This part works fine, the data is filtered almost instantaneously.
    After this, I have 3 column selectors and 3 boxes where users put values they wish to update the filtered rows to,
    There is an update button that calls the dynamic action (procedure that is written below).
    It should be straight out, the only performance issue could be the decode section, because I need to cover cases when user wants to set a value to null (@) and when he doesn't want update 3 columns, but less (he leaves '').
    Hence P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||')
    However when I finally click the update button, my browser freezes and nothing happens on the table.
    Can anyone help me solve this and improve the speed of the update?
    Regards,
    Ivan
    P.S. The code for the procedure is below:
    create or replace
    PROCEDURE DWP.PROC_UPD
    (P99_X_UC1 in VARCHAR2,
    P99_X_UV1 in VARCHAR2,
    P99_X_UC2 in VARCHAR2,
    P99_X_UV2 in VARCHAR2,
    P99_X_UC3 in VARCHAR2,
    P99_X_UV3 in VARCHAR2,
    P99_X_COL in VARCHAR2,
    P99_X_O in VARCHAR2,
    P99_X_V in VARCHAR2,
    P99_X_COL2 in VARCHAR2,
    P99_X_O2 in VARCHAR2,
    P99_X_V2 in VARCHAR2,
    P99_X_COL3 in VARCHAR2,
    P99_X_O3 in VARCHAR2,
    P99_X_V3 in VARCHAR2,
    P99_X_COL4 in VARCHAR2,
    P99_X_O4 in VARCHAR2,
    P99_X_V4 in VARCHAR2,
    P99_X_COL5 in VARCHAR2,
    P99_X_O5 in VARCHAR2,
    P99_X_V5 in VARCHAR2,
    P99_X_CD in VARCHAR2,
    P99_X_VD in VARCHAR2
    ) IS
    l_sql_stmt varchar2(32600);
    p_table_name varchar2(30) := 'DWP.IZV_SLOG_DET'; 
    BEGIN
    l_sql_stmt := 'update ' || p_table_name || ' set '
    || P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||'),'
    || P99_X_UC2 || ' = decode('  || P99_X_UV2 ||','''','|| P99_X_UC2  ||',''@'',null,'|| P99_X_UV2  ||'),'
    || P99_X_UC3 || ' = decode('  || P99_X_UV3 ||','''','|| P99_X_UC3  ||',''@'',null,'|| P99_X_UV3  ||') where '||
    P99_X_COL  ||' '|| P99_X_O  ||' ' || P99_X_V  || ' and ' ||
    P99_X_COL2 ||' '|| P99_X_O2 ||' ' || P99_X_V2 || ' and ' ||
    P99_X_COL3 ||' '|| P99_X_O3 ||' ' || P99_X_V3 || ' and ' ||
    P99_X_COL4 ||' '|| P99_X_O4 ||' ' || P99_X_V4 || ' and ' ||
    P99_X_COL5 ||' '|| P99_X_O5 ||' ' || P99_X_V5 || ' and ' ||
    P99_X_CD   ||       ' = '         || P99_X_VD ;
    --dbms_output.put_line(l_sql_stmt); 
    EXECUTE IMMEDIATE l_sql_stmt;
    END;

    Hi Ivan,
    I do not think that the decode is performance relevant. Maybe the update hangs because some other transaction has uncommitted changes to one of the affected rows or the where clause is not selective enough and needs to update a huge amount of records.
    Besides that - and I might be wrong, because I only know some part of your app - the code here looks like you have a huge sql injection vulnerability here. Maybe you should consider re-writing your logic in static sql. If that is not possible, you should make sure that the user input only contains allowed values, e.g. by white-listing P99_X_On (i.e. make sure they only contain known values like '=', '<', ...), and by using dbms_assert.enquote_name/enquote_literal on the other P99_X_nnn parameters.
    Regards,
    Christian

  • Issue with Adobe Form Layout

    Hi,
    I have an issue with the Adobe Form Layout.Although I have added a field in the Context Menu of the Form Builder but the context has not been added to the Data View.
    Could you please help me to understand how to include the parameters and structures that we define in the context and add them to the Data View in layout?As far as I know, it is done automatically.But in this case I don't understand what the problem is.
    Please help me.
    Thanks,
    Sandeep.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jul 14, 2009 4:10 PM

    it is normally done automatically. Do ANY of your fields show in your DATA VIEW? Or, are you just missing the new one?
    If you're only missing the new one, make sure your Context has the field defined correctly and generated.. Then make sure you have updated the mapping in your View Context and generated that.
    After those 2 things, your field should now show.
    You cannot, as far as I know, define an attribute as any sort of TABLE - we have a common structure that has several Table Types in it. When we import that structure, we have to delete those attributes and create Nodes to mimick those tables.
    If you've accidentally included a Table type as an attribute, you won't see any fields in your Data View.
    EDIT: by the way, there's an Adobe Interactive Forms Forum where you should ask these kinds of questions.
    Edited by: robert phelan on Apr 2, 2009 8:51 PM

  • Issue with mouseListener / global variables

    So in my project, im having an issue with incrementing a counter using mouseListener. i have 2 windows pop up telling the user whose turn it is and then that players dice roll. after this i want the program to wait untill the player moves their piece. after they have moved their full move, it should go on to the next player. the issue im having is getting the program to wait for the player to make his moves, and i cant quite get it to work. it either skips the move and goes to the next player or never sees that the player has moved fully.
    public int getTurnsLeft(){
    return turnsLeft;
    public void setTurnsLeft(int newTurnsLeft){
    turnsLeft = newTurnsLeft;
    }these are what im using for both my mouseListener release method and my playTurn method to get and set the number of moves left.
    public void mouseReleased(MouseEvent e) {
              if(playerPiece == null) return;
              playerPiece.setVisible(false);
              Component c =  playBoard.findComponentAt(e.getX(), e.getY());
              if (c instanceof JLabel){
                   Container parent = c.getParent();
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              else {
                   Container parent = (Container)c;
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              playerPiece.setVisible(true);
         }mouse release method
         public void playTurn(){
              JOptionPane.showMessageDialog(null, "Player " + this.getPlayerNum() + "'s turn");
              int turns = (int)diceRoll();
              this.setMoveCount(turns);
              System.out.println(turns);
              int turnCheck = 0;
              while(turnCheck == 0){
                   System.out.print(getTurnsLeft());
                   if(getTurnsLeft() < turns)
                        turnCheck = 0;
                   else
                        turnCheck = 1;
              setTurnsLeft(0);
         }play turn method
    when i run this, the mouseRelease method can modify turnsLeft and get back the correct number, but in the playTurn method, i only get 0, which is what turnsLeft starts at. shouldnt they both get the same value, since there getting the value from the same source? or is the while loop the issue here?

    Your turnsLeft is really deceptively named, it is actually the number of steps taken during the current turn. Better rename it for clarity.
    The problem seems to be in your threading, I don't see how the while loop can end ('never sees that the player has moved fully'?) unless the diceRoll returns zero ('skips the move').
    What you should do is print out that diceRoll for more information (why doesn't it return an int? Use random.nextInt(maxSteps) + 1).
    And probably the end-of-turn check should be in setTurnsLeft(). You need to store the 'number of step this turn' as a class variable.
    So rename:
    playTurn -> startTurn
    turns -> steps
    turnsLeft -> stepsTaken
    setTurnsLeft(int) -> completeStep() which checks if stepsTaken >= steps and if yes calls completeTurn() which can check for a win or call the other players startTurn().

  • Issues with dynamic text box formatting

    I'm running into issues with using HTML formatting for a dymanic text field. I know these are quirky and I cannot figure out how to get the formatting proper.
    I have on my stage a dynamic text box called "content_txt" inside of a movie clip instance "content_mc". When it enters the frame, I fade the "content_mc" from alpha 0 to 100 using a timeline animation. In order for this to work, I have to embed the font in my "content_txt" text field. However, the only way I get get the HTML formatting to work is if I do not embed the font.
    The dymanic text field is set to render as HTML. In my actions layer, I set the text:
    this.content_mc.content_txt.htmlText = "<b>Hello world,</b> it is me again."
    In summary:
    1. If I do not embed the font, the alpha fade does not work but the HTML formatting does.
    2. If I embed the font, the alpha fade works but the HTML formatting does not.
    How do I resolve this? It's driving me nuts!

    How do you embed just one style?
    I've tried typing three words in the text field and formatting each (regular, bold, italic) but the text field just defaults to whichever format is first.
    Also, I tried embeding the whole character list and did not have success.

  • Data Integration issue with Adobe form

    Hi,
    We have been using many xACF forms in our WebDynpro java based application.
    For one of the xACF adobe form sometimes I'm not getting the data from adobe form to webdynpro context.
    Anyone can pls tell what may be the problem other then binding because that part i have already checked and it's working fine in some of the PC.
    Regards
    Ravindra Singh

    Hi Chintan,
    thanks for your reply.
    I tried that part already by converting xACF form to ZCI but facing issues with the drop-downs.
    Actually some of the dropdowns have values more than 1000. The value help for these drop downs comes as pop up in case of ZCI forms and the mazer problem is that in offline scenario doesn't even shows values for such dropdowns as a pop up or normal drop down.
    As per the SAP Note 1013227 we are using the enumerated type of drop downs for such larger values but no help in offline  scenario. I tried by changing the parameter value in visual admin as suggested in sap note which prevents pop-up for lager values but it's not recommended by SAP. Only because of this issue we are not able to migrate from xACF to ZCI.
    Do you have any idea how to get values for such drop downs in offline scenario.
    Thanks & Regards
    Ravindra Singh

  • Spry event listeners with dynamic form elements

    Hi ,
    I am trying to implement spry event listeners with a form that has dynamic check boxes and text field name. I now i can get the elements in a var and loop through with a normal function but can this work for spry events listeners

    Short answer is yes. But I have a feeling that you need further assistance, in which case give us a URL to a page that you want to apply the event listener to.

  • 2 Formatting issues with HTML forms

    I have a couple of issues that we can't seem to get past with adobe livecycle designer 7.0. We have an internal form, rendered in HTML, that is emailed between departments, and the data entered is stored in an XML file that is created using the code similar to the following:
    protected void doPost(HttpServletRequest request,
    HttpServletResponse response) throws
    ServletException, IOException
    oOutput = response.getOutputStream();
    try {
    FormServerWithXML fsb = new FormServerWithXML();
    fsb.processForm(request);
    File file = File.createTempFile("Form_", ".tmp", new
    File("d:\\xmlFiles"));
    BufferedWriter(new FileWriter(file));
    out.write(fsb.getXMLString());
    out.close();
    When we use a numeric field and try to format it with any display pattern containing dollar signs, decimals, etc... the xml data for that field isn't being written to the xml file. All of the other fields are being written properly.
    The next issue we're having is that with HTML forms, when we create a multiline text field we are unable to limit the number of characters that are allowed in the field.
    I'm pretty new with this, so please send some advice my way if you have any.
    Thanks,
    Chad

    Thanks Rakhi, but that did not resolve my issue. Below is new out as per the thread suggestion and this is not what I wanted.:
    "<H>Thank you for choosing Enterprise.</> We look forward to seeing you at 9:00 am on Monday,
    November 28, 2011. This message is to confirm you have updated your reservation.
    Following are the details for the updated reservation:
    P.S. Remember us when you're renting in town. Enterprise is always nearby at more than 6,500
    neighborhood locations."
    - shalini

  • Issue with Dynamic WHERE condition in Cursor in FUNCTION.

    Hi All,
    I am facing an issue with cursor having dynamic WHERE condition in a function.
    Below is the FUNCTION:
    CREATE OR REPLACE FUNCTION EXCEPTION_MERGE(TABLE_NAME IN VARCHAR2, TAB_NAME IN VARCHAR2)
    RETURN VARCHAr2
    IS
    stmt_tabcols VARCHAR2(32767);
    v_columnname VARCHAR2(32767);
    CURSOR C1 IS
    SELECT 'A.'||A.COLUMN_NAME ||' = '|| 'B.'||B.COLUMN_NAME COLUMN_NAME
    FROM
    SELECT COLUMN_ID, COLUMN_NAME
    FROM USER_TAB_COLUMNS
    WHERE TABLE_NAME  = TABLE_NAME
    AND COLUMN_NAME NOT IN ('ERROR_TAB_ID','ERROR_LOAD_DATE')
    ) A,
    SELECT COLUMN_ID, COLUMN_NAME
    FROM USER_TAB_COLUMNS
    WHERE TABLE_NAME = TAB_NAME
    ) B
    WHERE A.COLUMN_ID = B.COLUMN_ID;
    BEGIN
    FOR TABCOL IN C1
    LOOP
        stmt_tabcols := stmt_tabcols ||TABCOL.COLUMN_NAME||',';
    END LOOP;
        stmt_tabcols := RTRIM(stmt_tabcols, ',');
        RETURN stmt_tabcols;
    END;
    SELECT EXCEPTION_MERGE('WC_W_TEST_FS','WC_W_TEST_FS_GBL') FROM DUAL;It throws, below error:
    ORA-06502 : PL/SQL : Numeric or value error : character string buffer too smallIf I REPLACE TABLE_NAME and TAB_NAME with hard coded values , it works fine. Can somebody look at the code and let me know the issue.
    Edited by: ace_friends22 on Sep 9, 2012 1:08 PM

    Etbin neatly demonstrating the value of posting code in a manner which makes it easy to read.
    It's obviously an naming/scoping issue. Faced with a join like this:
    where table_name = table_namethe engine looks for something called table_name in the current scope. It finds it, a column on USER_TAB_COLUMNS and applies it to both sides of the filter. It has no way of knowing that there is also a parameter called TABLE_NAME, because that is outside its current scope. Consequently the query will join every table in your schema regardless of what values you pass, and that's why you blow the buffer.
    Takw etbin's advice and name your parameter with a prefix:
    where table_name = p_table_nameThis isn't a column in USER_TAB_COLUMNS which will force the engine to look in the next scope up, which in your case is the function, where it will find your parameter and so generate a query for the passed values only.
    Cheers, APC
    Edited by: APC on Sep 9, 2012 8:03 AM

  • Slow loading and tabbing with dynamic form

    Hi. I have a 45 page pdf and I need to be able to select some pages to not print based on content of a field. To do this I understand the form needs to be saved in Acrobat v7 or greater and saved as a dynamic form. So far so good. When I create the dynamic form by opening the existing 45 page pdf, livecycle creates a form object for each line in the document. That's a ton of objects that don't need to be objects. I am adding 15 enterable fields into this document. For example the document may contain a line of text "Last Name", this appears as a form object as described. I am adding a text field next to that so the user can enter their last name. After saving the document it takes a long time to load and the tabbing from field to field is very slow. I am thinking this might be due to processing all the form objects that don't need to be form objects, but not sure. Question: based on my description is there a way to create this document without all those non-enterable form objects?

    Hi. I have a 45 page pdf and I need to be able to select some pages to not print based on content of a field. To do this I understand the form needs to be saved in Acrobat v7 or greater and saved as a dynamic form. So far so good. When I create the dynamic form by opening the existing 45 page pdf, livecycle creates a form object for each line in the document. That's a ton of objects that don't need to be objects. I am adding 15 enterable fields into this document. For example the document may contain a line of text "Last Name", this appears as a form object as described. I am adding a text field next to that so the user can enter their last name. After saving the document it takes a long time to load and the tabbing from field to field is very slow. I am thinking this might be due to processing all the form objects that don't need to be form objects, but not sure. Question: based on my description is there a way to create this document without all those non-enterable form objects?

Maybe you are looking for

  • How to tell if application is running?

    In Tiger, an open application would show on the Dock with a small arrow pointing at it. In Leopard, I don't see that. How can you tell which applications on your Dock are currently running?

  • HT4061 my Ipad mini has been disabled.  How can I get back in?

    Hello - I down loaded the new ISO 07 software today. I was asked for my passcode...not sure what this meant and tried a few pass words which didn't get me in. Now I realize this must have meant for me to enter my Apple Pass word.  Now when I enter it

  • Destination Folder for Lightroom 4

    What should the desitnation folder be for Lightroom 4?

  • Content of the album I purchased is partially downloaded.

    Content of the album I purchased is partially downloaded. Songs doesnt play after 1second and skips to next song. How do I get the complete album downloaded without such errors?

  • OracleBIServerComponent not Running

    Hi, I had faced an issue recently where my obiee services would not up.All the components where running fine except the OracleBIServerComponent. After initial investigation i found out that the rpd was changed to a zero byte file and a bak and sav fi