Download link with parameters.

I've created a generic download function that takes a couple of parameters. The function works but now I'm trying to find out how to provide a download link that has the parameters filled in based on some page items.
Page items:
P38_export_type: The user can select what kind of data to download
P38_filename: The user can provide a filename
What I've tried is to create a button: Redirect to URL
#OWNER#.download_my_file?p_application_id=&APP_ID.&p_filenaam=&P38_FILENAME.&p_functie=Statistiek&p_parameter1=&P38_EXPORT_TYPE.
Although this creates a link, the parameters are filled on page load. This is to early, I need the values at the time the button is pressed.
Any ideas how to do this?

Hi thanks,
In the meantime I figured out something similar.
function my_redirect ()
  redirect(html_GetElement('P38_OWNER').value+".download_my_file?p_application_id="+html_GetElement('pFlowId').value+"&p_filenaam="+html_GetElement('P38_BESTAND').value+"&p_functie=Statistiek&p_parameter1="+html_GetElement('P38_SOORT_EXPORT').value);
} I struggled a bit with the owner value before I decided to put it in a hidden field. Passing it as a variable is a better idea.
It seems that accessing the item values can be done in several ways.
redirect or location.href=URL ? any preference?

Similar Messages

  • How to display download link with get_blob or get_blob_file_src ?

    Hello there,
    I am struggling to display a download link in a SQL query report.
    Based on the requirement, I have to create a sql query report that the source contains a series of union select query.
    Example here
    WITH current_engagement AS (
    SELECT defendant_id, engagement_id, pn, ethnicity, date_joined_aodt_court, case_manager_name
    , participation_conditions, discharge_conditions
    FROM engagement
    WHERE defendant_id = :PXX_DEF
    AND date_joined IS NOT NULL
    AND ( date_terminated IS NULL OR to_date(date_joined,'DD/MM/YYYY') > to_date(sysdate,'DD/MM/YYYY'))
    AND active = 1 AND ROWNUM = 1
    ORDER BY defendant_id DESC
    SELECT def.first_name, def.middle_name, def.surname, to_char(def.pn) AS "PN", to_char(def.nhi_number) AS "NHI"
    ,ce.ethnicity, to_char(ce.date_joined) as "DATE_JOINED ", ce.case_manager_name, ce.participation_conditions, ce.discharge_conditions
    FROM defendant def INNER JOIN current_engagement ce
    ON def.def_id = ce.defendant_id
    UNION ALL
    select ' <b>2. Phase Number</b>' , '<b>Date Started</b>' , '<b>Date Finised</b>' , '<b>Notes</b>' , null
    ,null , null , null , null , null
    from dual
    UNION ALL
    SELECT TO_CHAR(NVL(ph.phase_number,'No Phase Found')), TO_CHAR(ph.date_started, 'DD/MM/YYYY'), TO_CHAR(ph.date_finished, 'DD/MM/YYYY'), ph.notes, null
    , null , null , null , null , null
    FROM phase_membership ph INNER JOIN current_engagement ce
    ON ph.mpm_eng_id = ce.engagement_id
    WHERE to_date(ph.date_started,'DD/MM/YYYY') <= TO_DATE(sysdate,'DD/MM/YYYY')
    AND ( ph.date_finished IS NULL
    OR TO_DATE(ph.date_finished, 'DD/MM/YYYY') >= TO_DATE(sysdate,'DD/MM/YYYY') )
    AND ph.active = 1
    UNION ALL
    --more selects
    -- then the last select is to list all related documents with download links
    select '<b>6. Document Date</b>' , '<b>Document Type</b>' , '<b>Description</b>' , '<b>Download</b>'
    , null ,null , null , null , null , null
    from dual
    UNION ALL
    SELECT TO_CHAR(doc.date_received), doc.document_type, doc.comments, TO_CHAR(dbms_lob.getlength(doc.UPLOADED_FILE))
    , null ,null , null , null , null , null
    FROM document doc INNER JOIN current_engagement ce
    ON doc.d_eng_id = ce.engagement_id
    WHERE doc.active = 1
    This report is generated fine.
    But the requirement also ask to display a download link. And because it is union selects, all following selects must be the same as the first select column data types.
    In this case, it has to be CHAR. Otherwise, it will generate error as below
    ORA-01790: expression must have same datatype as corresponding expression
    So I follow the GET_BLOB_FILE_SRC Function step from
    http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm#AEAPI129
    I turn my last select into
    SELECT TO_CHAR(doc.date_received), doc.document_type, doc.comments,
    CASE WHEN NVL(dbms_lob.getlength(doc.UPLOADED_FILE),0) = 0
    THEN NULL
    ELSE
    'Download'
    END
    , null ,null , null , null , null , null
    FROM document doc INNER JOIN current_engagement ce
    ON doc.d_eng_id = ce.engagement_id
    WHERE doc.active = 1
    Which the result inside the hreg is
    http://app_address_here/f?p=208:48:1303335952329758:::::
    while if I use Interactive report the link is
    http://app_address_here/apex_util.get_blob?s=1303335952329758&a=208&c=66645817090447568&p=48&k1=12&k2=&ck=A18D20D407435BD649EA3399EC27BC00&rt=CR
    and it works well.
    I do a research and know that get_blob_file_source link to the source of the column / field name located in the first parameter.
    So I had put the UPLOADED_FILE column, DOCUMENT table in the source of the column PN.
    But it still does not show anything that close to the correct one that is generated by interactive report.
    If anyone has any ideas, please help. If I need to manually write using get_blob , please give me an example.
    I urgently need to do this report.
    The version of APEX we use is Application Express 4.0.2.00.07
    And I cannot ask for an upgrade to 4.2 till the end of next year.
    Please help.
    Thanks a lot in advance.
    Ann.

    Hi Ann,
    Here you can see and download the example :
    http://apex.oracle.com/pls/apex/f?p=63066:1
    Please let me know if you need access the work space.
    Hint, Please read the FAQ section. had you put your thread in a better format, you would have gotten a quicker response :)
    Regards,
    Fateh

  • Problem to create a link with parameters using a PL/SQL function body

    Hi everybody,
    I need some help to create a link on a SELECT statement.
    I have a region report with type "PL/SQL function body return SQL query".
    I would like to use a link using HTML tag <a href>.
    I know how to do the link, but I don't know to pass a parameters in <a href> statement.
    Always I tried it doesn't work well.
    My PL/SQL anonimous block is, (just with link) :
    DECLARE
    q vARCHAR2(4000);
    BEGIN
    q:='select     "INDICADOR"."NRINDICADOR" as "NRINDICADOR",';
    q:=q||'     "INDICADOR"."DSINDICADOR" as "DSINDICADOR",';
    q:=q||'''<span style="font-weight:bold;">';
    q:=q||'''||TO_CHAR("TOTAL_INDICADOR"."VL_INDICADOR", ''999G999G999G990D00'')||''</span>''';
    q:=q||' as "VL_INDICADOR",';
    q:=q||'     "TOTAL_INDICADOR"."VL_META" as "VL_META" ';
    q:=q||' from     "TOTAL_INDICADOR" "TOTAL_INDICADOR",';
    q:=q||'     "INDICADOR" "INDICADOR" ';
    q:=q||' where "INDICADOR"."NRINDICADOR"="TOTAL_INDICADOR"."NR_INDICADOR"';
    RETURN q;
    END;
    Thanks for any help,
    Alessandra

    Your code is in a default value for an item, right?
    You need to make sure :P33_YEAR is not null and handle the error in the PL/SQL if it is.
    How is P33_YEAR populated? do you pass it in? check to see if it is making it there..
    Message was edited by:
    Bill Carlisle

  • Trying to use form or dynamic link with parameters in a portlet

    I have created a dynamic page and published it as a portlet. The dynamic page is my own customization page for a chart.
    Ont he same page as the portlet I have the chart I want to customize. I have tried defining the form action as the page itself with the extra custom parameters in the url and I have tried just building up a url and callong that url (if we have a link on the chart names that is what happens and it works). However, it doesn't work.
    It should read (and does when I use a javascript alert): http://ogg:7777/servlet/page?_pageid=134,148&_dad=portal30&_schema=PORTAL30&_mode=3&city=Berlin
    but instead using a form it reads:
    http://ogg:7777/servlet/page?city=Berlin
    and using the link building method it reads:
    http://ogg:7777/servlet/
    What is happening to the link in either case? Why is it being altered? I've left the form action blank and also tried hard coding the URL but still get the same response.
    null

    We are doing something similar with our own customization form and the report it affects on the same page. We will also be doing the same thing with charts in the future. It took a great deal of trial and error, but we finally have a technique that works (even if it isn't ideal).
    1. The following is entered in your form in the "On successful submission of a form, execute this PL/SQL block or PL/SQL procedure" (this will retrieve your parameter value from your form and then call the page your form and report (or chart) are on):
    declare
    hv_myvariable varchar2(2000);
    l_store portal30.wwsto_api_session;
    begin
    -- Note that you have to add the 'A_' in front of your form field name!
    hv_myvariable:=p_session.get_value_as_varchar2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_MYVARIABLE'
    -- call the url of the page
    go ('http://host:node/servlet/page?_pageid=65&_dad=portal30&_schema=PORTAL30&_mode=3&myvariable='&#0124; &#0124;hv_myvariable);
    end;
    2. The following is entered in the report's "Additional pl/sql code- Before displaying page" to retrieve the parameters from the url:
    portal30.wwv_name_value.replace_value(
    l_arg_names, l_arg_values, p_reference_path&#0124; &#0124;'.myvariable',
    portal30.wwv_standard_util.string_to_table2(get_value('myvariable')));
    3. At this point, the process should work, but it will clear out your form fields when you refresh your page. To prevent this, enter the following for the default value of your form field:
    portal30.wwpro_api_parameters.get_value('myvariable','FORM_MY_FORM')
    Let me know if this works for you or if you have found other ways to accomplish some of these things. If anyone else can show us a better way to do this or any other useful techniques, we would greatly appreciate the help!
    null

  • Skype 6.20 download link with spellcheck and new U...

    Please, link for skype 6.20 with spellcheck and new UI.  Thanks ♥ 
    Sorry for my english  
    Solved!
    Go to Solution.

    I have not been able to get spellcheck to work in any build but the "59" one, and that continues with this 6.20 release. This is despite the checked option appearing in Tools/Options. Not sure if it's implemented yet in non-59 builds despite appearing in the UI. Win 8.1.
    http://download.skype.com/3c96eaf2d0d77a29ff363d43​57841955/partner/59/SkypeSetupFull.exe

  • Hyper Link With Parameters

    I have an display item on Page 1, which is a link.
    In the default box of its attributes I have
    @a href="f?p=&APP_ID.:197:&SESSION."@@font color = 'Red'@My [email protected]/[email protected]
    In the post I have replaced the < and > with a @
    This works perfectly well
    What I would like to do is when the link is clicked, go to Page 197 and set the Search field to equal a value from Page 1.
    ie, where :P197_SEARCH = :P1_TEXT
    Can I put this in the link ?
    Gus

    Hello Gus,
    Yes, you can - http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28550/concept.htm#BEIJCIAG
    Regards,
    Arie.

  • XCode 3 and iOS 4.3 download link with error

    Hi,
    I'm trying to download the lastest version of iOS SDK with XCode 3, with this link: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundl eID=20792 , but the link returns the error:
    We apologize.
    We are experiencing technical difficulties. Please try again later.
    If you would like to return to the Developer Downloads & ADC Program Assets site, please log in.
    Someone knows other source to download the SDK?
    Thanks

    I don't know...
    I'm just logging in the iOS Developer Center (https://developer.apple.com/devcenter/ios/index.action) and clicking in the link: Looking for Xcode 3? Download
    How can i know which servers i'm hiting?
    Thanks

  • JSF and links with parameters to restore jsf page state

    Hi,
    I've been developing a forum using JSF. It's going to be something similar to the one we are just using.
    If a user, while browsing forum, find something interesting he should have a possiblity to copy URL form his browser and give it to his friend.
    The URL should contain all necesary parameters to restore a same view (a subpage of a forum etc) a first user had. What's best approach to do it ?
    Say, I have a few AJAX components on a forum page, how can I restore their states ? What's even more interesting how can I generate add parameters to URL in a browser ?
    I've found a good solution for my problem:
    [http://ocpsoft.com/prettyfaces/]
    "PrettyFaces is an OpenSource extension with enhanced support for +JavaServer
    Faces+ - JSF 1.1, 1.2 and 2.0 - enabling creation of bookmark-able,
    pretty URLs. PrettyFaces solves the "RESTful URL" problem elegantly,
    including features such as: page-load actions, seamless integration with
    faces navigation, dynamic view-id assignment, managed parameter
    parsing, and configuration-free compatibility with other web frameworks"

    best approach would be http://www.phpbb.com/ :-)
    seems crazy going to all that hassel, phpbb is so simple, infact a lot of jsf forums such as primefaces [http://primefaces.prime.com.tr/forum/] use phpbb, as you can have your fourm up and running in no time
    Edited by: pNev on 3 Meith 2010 00:38

  • A Link with parameters to another page in a report

    Hi, I need to pass a link to another page with parameter, all in a report - But I can't use the column link because I already use to another link.
    Help!!

    Hi, I need to pass a link to another page with
    parameter, all in a report - But I can't
    use the column link because I already use to
    another link.
    Help!!Why not read the values from the calling page in the new page? They are there and available.. If you call page 2 from page 1, all the items on page one are available to page 2...
    Thank you,
    Tony Miller
    UTMB/EHN

  • I need to re-download CS6 but can't see a download link with the product.

    I lost my installation of CS6 due to an OS upgrade, and need to re-download and re-install it.  When I go to by Adobe account the purchase is listed, but I can't see a link anywhere to re-download the package.  The purchase was only about a year ago (i.e. within the 3-year re-download window).  What might I be doing wrong?

    Hi,
    Download CS6 products
    Thank You
    Arjun

  • How to open an external link with NTLM authentication

    Hi,
    My customer needs to open a link with parameters, and go directly to a specific page. The problem is the application uses NTLM to get the session first. After silence login, the parameter value is lost. Here is the link look like:
    f?p=200:1:0::::P1_ID:602:
    After authentication, it gets session and becomes:
    f?p=200:1:24365643544345
    Can anybody help me with this?
    Edited by: user8991541 on Apr 20, 2011 5:57 AM

    A UDL is technically a text file, so you could open it with "Read Characters from file", put the result string into a string control, edit it and save it back using the "Write Characters to File".
    UDLs however have their own configuration dialog embedded in the Windows OS. You can use this dialog in your LabVIEW application. The attached VI shows how to create a new UDL. You can edit an existing UDL by switching the method node to PromptEdit and wiring in an open ADO connection reference.
    Attachments:
    ConfigureDatabaseConnection.vi ‏26 KB

  • When I click on download link, Firefox don't pop-up window where i could select open with or to save file, it just pop-up window where to save, why?

    Before update, when i clicked on download link pop-up window would come up asking me if i wnat to open file with program or just save it, but after update i dont get that pop-up window, insted i get window asking me where to save it, how can i fix this problem, because i want sertain files to be opened with a program like it was before update? I have tried every solution i could find, and nothing helped. I use Firefox 16.0.2 on win7 ultimate x64bit

    Thank you, it helped alot. I found that my problem was that all programs in applications panel was set to "save file" option and when i changed them to "always ask" it was back to normal, like i used to :D many thanks

  • Problem with download link for a BLOB Column in a "Classic report"

    I am having a problem where I cannot make a download link for a blob column function in a "classic" (non-interactive) report. I went through the tutorial on this topic and it was great help it working out the minor bugs, but I get a 404 error (apex_util.get_BLOB not found). For testing purposes I went ahead and created a an identical report on the same page that is an "Interactive report" and it works like a charm. Same query, same BLOB formatting Mask, pulling data from the same table. So, it really doesn't seem like an issue with the grants, since both reports should be executing as the same user.
    I know it sounds like the obvious answer is to just go with the interactive report and my problem is solved, but the rest of this site uses classic reports, and I don't need the sort features of an interactive report, and the slightly different style of the the report really stands out even if I turn off all the bells and whistles. I don't want to change the css to make them look identical, I just want a regular report to work.

    I eventually found another post: APEX_UTIL.GET_BLOB was not found on this server
    In this post there is the suggestion of putting "dbms_lob.getlength("var")" after the date field in your select. So I changed my query to have it at the end, and now my format mask (DOWNLOAD:table_name:ATTACHED_FILE:FILE_ID::FILE_MIME_TYPE:FILE_NAME:::attachment:Download) works like a charm, in a classic report.

  • Lightroom wants to me to install 5.6, but the download link takes me to a page with plain text bullet points, none of which are the update link. Can anyone give a direct lnik?

    Lightroom wants to me to install 5.6, but the download link takes me to a page with plain text bullet points, none of which are the update link. Can anyone give a direct lnik?

    Google "lightroom 5.6" and direct links to both Mac and Windows will be at the top.

  • My PC with Elements 8 crashed.... where can I find a download link for Elements 8?

    My PC crashed, with Elements 8 on it.  I want to re-install Elements 8 on my new PC, but I cannot find a download link within my adobe ID, or anywhere on the site for that matter.  I have no need to upgrade to a newer version of Elements.  Solutions?

    If you choose the download option at the time of purchase then please see http://forums.adobe.com/thread/1006208?tstart=0&promoid=KBHJQ for information on how to download your software.
    If you purchased a DVD but are not able to locate the installation media then please see http://prodesigntools.com/direct-download-links-for-lightroom-3-and-photoshop-elements-8.h tml for information on how to download a fresh copy of the install files.  Please make sure to follow the Very Important Instructions section as opposed to simply scrolling to the bottom of the page and clicking on the download link. 
    Once the download is complete please make sure to make a backup copy of the installation files in case you need access to them again in the future.

Maybe you are looking for

  • Confirmation of services= Finance can not process it.

    Hi Guys, For return to vendor here is our process. PO get created Then delivery get generated And then when we PGI , it is not creating any material document and accountng document. Just a confirmation of service. So it is blocked in Finance. Can can

  • Decrypt and unzip a File + read a XML file received into the ZIP

    Hello, I need your help to develop some a complex Biztalk application. Here're my needs : Our Busness partner send us a zip file cripted with a standard PGP(Pretty Goof Privacy). The zip containts an XML file that i have to deal it, and some attachme

  • Writing dates through XSL transformations

    I have made an application that writes XML files through XSL transformations, using JAXP 1.1. The problem is that I have to write the current date in the output XML data. I think the only way to do this is by using XSL language bindings. Unfortunatel

  • Constant Crashing PLEASE HELP

    So Safari has constantly been crashing since I updated to the new Safari 4. It crashes multiple times, and I report it, but it doesn't seem to help. I don't know what to do, because it gets really annoying. I've read in previous threads that sometime

  • Problems with mail on new 27" iMac

    I bought a 27" iMac a few months ago, and just recently the apple mail program has started acting very strangely. Sometimes I'll be looking at my inbox, and want to look at another mailbox, but when I click on that other mailbox nothing shows up, eve