CF Set form.variable for query and Next/Previous pages error

I have a CF form with a select that posts to a CF "action" page.
On the action page I: CFSET ItemNumber=#form.ItemNumber#
I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
Here's the problem:
I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
I hope I've not made this sound confusing.
I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
Thanks to anyone in advance for shedding light on this.
- e

Thank you for the reply, Owain.
Yes - The Next/Previous at the bottom of the page are hyperlinks.
<a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
<cfparam name="ItemNumberDropdown01" default="">
<cfset ItemNumber = #form.ItemNumberDropdown01#>
The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
Thanks again for the 'education' on this...
- ed

Similar Messages

  • Variables for prior and next periods in logic

    Hi,
    I'd like to do something that I would have thought should be quite simple, but I just haven't managed to get it right.
    In Category, we use the properties Year and Month. For example:
    Member  Year     Month
    Actual     2014     APR
    SP          2016     DEC
    The issue is that we would like to create SP (Strategic Plan) for 3 years, of which the year in the property, 2016, is the first.
    Creating variables for the month and for the first SP year is simple:
    *SELECT(%CYEAR_SP%,"[YEAR]","CATEGORY","[ID]= 'SP'")
    *SELECT(%CMONTH_SP%,"[MONTH]","CATEGORY","[ID]= 'SP'")
    I'd then like to  dynamically create 3 variables based on properties Year and Month; %SP1%, %SP2% and %SP3%, that I can use in scoping, in *WHEN/*IF, in GET and in *REC. It should be something like:
    %SP1% = %CYEAR_SP%.%CMONTH_SP% (2016.DEC)
    %SP2% = %CYEAR_SP%(+1).%CMONTH_SP% (2017.DEC)
    %SP3% = %CYEAR_SP%(+2).%CMONTH_SP% (2018.DEC)
    However it doesn't seem possible to use mathematical expressions for this, and I haven't managed to use NEXT or PRIOR successfully either.
    Has anybody out there encountered this?
    /Cecilia

    Thanks Roberto! Square brackets for Year in *SELECT was the syntax solution, works like a charm!.
    I developed this further by creating new variables concatenating the year and  month:
    *SELECT(%SP1%,"[ID]","TIME","[ID]='%CYEAR_SP%.%CMONTH_SP%'")
    *SELECT(%SP2%,"[ID]","TIME","[ID]='%CYEAR_SP2%.%CMONTH_SP%'")
    *SELECT(%SP3%,"[ID]","TIME","[ID]='%CYEAR_SP3%.%CMONTH_SP%'")
    /Cecilia

  • How to set bind variable for a VO ,

    Hi,
    i got a requirement in which i have to set bind variable for VO , But the Bind variable is coming from payload attribute,
    For example my query in VO is select * from Employee where emp_id="payload attribute"
    How to set this attribute value is from the payload
    Thanks Regard
    Rajendar

    Hi i am getting this exception " Cannot create an object of type:java.lang.Number from type:oracle.bpel.services.datacontrol.data.DataObject with value:21159"
    Actually i am getting Decimal Value from Payload of BPEl process and i am trying to set this to The bind variable
    is that a type cast exception where can i typeCast Those values You should this in a new thread.Dont ask questions out of the scope of this thread.
    Please mark this thread as answered or helpful if you got solution for this thread.
    Thanks!!!

  • How to set bind variables for child VO in hierarchy component?

    Hi,
    Recently I created a application with Hierarchy Component with Parent VO (Query based VO with Bind variables in it) and its Child VO along with Child-Child VO(Query based VO with bind variable in it)
    I am able to set bind variable of parent VO but unable to set bind variable for Child-Child VO. Can any one help me regarding this issue?

    Hi i am getting this exception " Cannot create an object of type:java.lang.Number from type:oracle.bpel.services.datacontrol.data.DataObject with value:21159"
    Actually i am getting Decimal Value from Payload of BPEl process and i am trying to set this to The bind variable
    is that a type cast exception where can i typeCast Those values You should this in a new thread.Dont ask questions out of the scope of this thread.
    Please mark this thread as answered or helpful if you got solution for this thread.
    Thanks!!!

  • Set a variable for an item in an empty list

    Hi all
    I set a variable for an item in a list like this
    <c:set var="item" value="${myList[0]}" />..
    <c:if test="${ item != null}">
    </c:if>I tested and see that the application works OK even when myList is empty but I donot know that my way is correct or not. Is there any problem happen if myList is empty?

    Thanks again, Balus
    <c:set var="item1" value="${firstList[0]}" />
    <c:set var="item2" value="${secondList[0]}" />
    <c:set var="item3" value="${thirdList[0]}" />The way above is shorter the way below:
    <c:if test="${not empty fistList}">
        <c:set var="item1" value="${firstList[0]}" />
    </c:if>
    <c:if test="${not empty secondList}">
       <c:set var="item2" value="${secondList[0]}" />
    </c:if>
    <c:if test="${not empty thirdList}">
       <c:set var="item3" value="${thirdList[0]}" />
    </c:if>

  • Can we create range variable for Query Key Date

    Hello Gurus,
    Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
    so, Please let me know if we can use Range variables for Query Key Date ??
    Thanks in advance,
    Regards,
    Aarthi

    Hi Aarthi,
    This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
    The default key date value is the date on which the query is executed, that is <Today>.
    Hope this helps...

  • How to set enviroment variables for Inso Filter

    Hi everyone,
    I want to convert word documents to html using CTX_DOC.Filter.According to the documentation,I know I neednot set the 'Inso Filter'in the preference when creating index,but I must set enviroment variables for Inso Filter.
    I found the following instructions for it in the 8.1.5 documentation,but I can't understand it well.Is there anyone can tell me how to set enviroments variables for Inso Filter on Windows2000 Server?(My DB version is 8.1.7EE)
    Environment Variable Locations
    All environment variables related to Inso filtering must made visible to interMedia Text. Set these variables in the following locations:
    listener.ora file. This makes the environment variables visible to the extproc PL/SQL process.
    The operating system shell from where ctxsrv server is started. This makes the environment variables visible to the ctxsrv process, which does background DML.
    Any suggestions are apreciated
    Reemon
    null

    NSAPI plugins are normally configured using parameters specified in magnus.conf and/or obj.conf. What plugin requires you set an environment variable?

  • Data Blocks - Different data source for Query  and DML

    Would anyone please tell me if it is possible in a BLOCK to define a stored procedure for queriying and a table for DML operations or vice-versa at the SAME time.
    If possible how do you do it using DATA BLOCK WIZARD? If you select your block to be based on stored procedure then it gives only stored procedure options for Querying and DML operations in next few screens.
    Also, suppose I used a stored procedure defined in a block for insert operations, is it implicitly called by INSERT RECORD function key in default menu? How does it take values from different fields on its own?

    Hi Deepon,
    We get data from both BSIK(open items)and BSAK (cleared items). Obviously if a accounting doc is not cleared it would be in open items and vice versa..
    Go through the help link for more information..
    http://help.sap.com/saphelp_bw33/helpdata/en/90/10e73a86e99c77e10000000a114084/frameset.htm
    Regards
    Manga(Assign points if it helps)
    Message was edited by: Manga

  • How to fill up set up tables for 2lis_03_UM and BF?

    Hi,
    I am working on Material movements, and i have a How to do document. According to that, its showing me to fill up set up table for 2Lis_03_bf by using TCode OLI1BW, and in the very next step its again telling me to fill up set up table for UM, by using the same TCODE ( OLI1BW ) .
    Now, if i do that, how would the system know that it has to fill up set up table for BF and then UM ? , no where in the screen its asking to fill up the Data source.
    OR i just have to fill up set up table ONCE, and it will fill up for both the DS ?
    please help.
    thanks

    Hi,
    I think you can follow the same procedure.  After completion of setup table filling you can check the result in RSA3.
    In case of UM, you will have the provision to load data based on specific Company codes, but if you don't have any such requirement then you can simply fill setup tables.
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Aug 30, 2011 10:29 AM

  • HT201328 I have been given permission for unlocking my iphone 3 GS from Orange. I want to set up the phone for my wife to use with a new number and carrier. Do I unlock under my itunes account first or set one up for her and then unlock the phone.

    I have been given permission for unlocking my iphone 3 GS from Orange. I want to set up the phone for my wife to use with a new number and carrier. Do I unlock under my itunes account first ( I now have a new iphone on this account) or set one up for her and then unlock the phone. I am worried about upsetting the new phone.

    I would complete unlocking as is and then
    restore as new once you know the iPhone is unlocked
    Be aware Orange will process the request at their speed
    one of the reasons they usually reside at bottom of User Sat surveys
    will likely take weeks
    This may also help
    http://support.apple.com/kb/HT5014

  • I see that many people have already complained about Itunes' backup encryption. I NEVER set a password for it (and the corresponding option is still unticked, as always) yet it asked me for a pwd when I upgraded my 3GS to the 5.0 OS. How to solve this?

    I see that many people have already complained about Itunes' backup encryption. I NEVER set a password for it (and the corresponding option is still unticked, as always) yet it asked me for a pwd when I upgraded my 3GS to the 5.0 OS. How to solve this?

    To prevent others from reading your mail, don't give them access to your account. If others need to use your computer for some reason, set up personal accounts, or a guest account, and switch to it before allowing them access. This is the simplest, and most effective, method.
    Email message files can be read as plain text in TextEdit or any word processor.
    To protect your email messages from being viewed by others while in your account, you would have to lock the folder, putting it into an encrypted disk image that required a password to be opened and mounted. You would have to double-click on the image and give your password to mount it before launching Mail then unmount it as soon as you're done. My guess is that you could replace the ~/Library/Mail folder with an alias pointing to the folder on the disk image.
    It may work, but it seems like a lot of unnecessary hassle.

  • For printer LaserJet Profession​al CM1410 any chance to set printing password for windows and MAC

    Dear All
    for printer  LaserJet Professional CM1410 any chance to set printing password for windows and MAC?please help?

    What Windows OS are you using?  Are you networked?
    If you are networked, you have to setup your file and print sharing options in order to require password assess.  If you are just trying to control specific files from being printed, you can do that, too.
    If you are just trying to control the amount of printing off of a single PC with a printer, you could setup different accounts for each user and limit their access. 
    Some of the commercial printers can have password options, but I do not find any password options for the CM 1410, other than what I provided earlier.
    If I have been helpful, a Kudo is always appreciated.

  • How to set userlevel permission for GFS and NFS

    hi
    how to set userlevel permission for GFS and NFS?
    regards

    hi
    http://www.redhat.com/docs/manuals/enterprise/
    AND
    http://en.tldp.org/
    probably your best bet.
    regards

  • After an update to firefox I keep getting a warning from my Firewall (McAfee) "Program wants internet access". I have permission set at outgoing for firefox and updates checking off, to check that request is valid so what does it need access for

    After an update to firefox I keep getting a warning from my Firewall (McAfee) "Program wants internet access". I have permission set at outgoing for firefox and updates checking off, to check that request is valid so what does it need access for

    This was not a Firefox update, but a piece of malicious software you have inadvertently downloaded from a site called http://ffftp.co.cc/ which is impersonating Firefox. I discovered this as soon as my Zonealarm requested permission for "Golds" to access the internet. Golds??!! However I couldn't find a file with this name installed on my computer.
    You should delete the file you downloaded and certainly do not allow internet access to any suspicious program. If you have already given permission, scan your PC immediately for any virus, malware, etc. Best of luck.

  • I desperately would like to update Firefox to version 10 from version 9 but each time I try, I am stuck with FF10 checking addons for comparability and the Welcome page opening every time I start the browser.

    Windows 7 64 bit
    I desperately would like to update Firefox to version 10 from version 9 but each time I try, I am stuck with FF10 checking addons for compatability and the Welcome page opening every time I start the browser. I continue to have to revert to version 9 to resolve this issue.

    Sorry to be a while getting back! Tried all of that with no sucess so this AM, bit the bullet and deleted the FF folder from programs and downloaded and installed FF 10.01. Still was plagued with the same problem. Went into the appdata folder and there were two sessionstore.js files. Deleted them both, restarted the browser and no compatibility check for add-ons was done at start up and the extra tab for Welcome to FF was no longer opening Everything seems to be working as it should and I did not loose any of my settings.. Thank you for trying to help and I hope my solution helps anyone else who might experience this in the future. Here's hoping the next update goes smoother!

Maybe you are looking for

  • How to calculate start date and last date for current week

    Dear All. i want to calculate the start of the current week as well as the last date of the current week, our week start from Saturday and ends of Friday i.e. Saturday is the first day of the week and Friday is the last day of the week. How can i ach

  • Dynamic Configuration of File Adapter

    Hi, XI Version 3.0 SP13, Planning to upgrade to SP14 In my scenario I need to pick up files from 4 static locations and based on the file name and pick up type(file/ftp) I can find out the destination's connectivity information from a Cross-Referenci

  • Graph X-Axis Labels are appearing in middle for negative y-axis values

    Hi, In my Graph Output, the X-Axis Labels are appearing in the middle (where zero is appearing) if the Y-Axis values are negative. It's a Line-Graph. Can anyone let me know how to move the X-Axis Labels to down? I'm using a custom Function module sam

  • Unable to download apps after purchase-in-app

    I've been trying to download apps but its unable after i purchased lives in "two dots" app. Then i couldnt able to download any apps because appstore sent me the error message abt the billing. Eventhough i tried and tried to use the same billing meth

  • MacBook Pro will not allow me to attach files to email

    After completing a software update last week, my MacBook Pro will now not allow me to send email attchments through Hotmail or Mocrosoft Outlook. I have been unable to upload photos to Facebook now either. The message I am getting is the Safari has q