URL Parameter passing problem
Below #name# displays the correct information from the gather table.
For instance, if pearl is logged in with users.userID = 5, then #name# displays mek, tiff which is correct.
But,in the a href, display_graphic2.cfm?userID=5 for both mek and tiff. And I need it to equal the userID that is in the users table so clicking on mek would link to: display_graphic2.cfm?userID=4 and tiff would link to: display_graphic2.cfm?userID=3
How can I do this?
gather table data
gatherID name
3 pearl
5 mek
5 tiff
6 sammy
users table data
userID name
3 tiff
5 pearl
6 vi
4 meka
Code:
<!--- find users based on match with loggin in user --->
<cfquery name="matches" datasource="gifts">
SELECT gather.name, gather.gatherID, users.userID
FROM gather INNER JOIN users
ON gather.gatherID=users.userID
WHERE gather.gatherID=<cfqueryparam cfsqltype="cf_sql_integer" value="#session.userID#">
</cfquery>
<!--- display logged in users matches and pass matched user userID in URL --->
See: <cfoutput query="matches">
<a href="display_graphic2.cfm?userID=#userID#">#name#</a>,
</cfoutput>
Not sure what the question is. In that data with that SQL statement,
userID and gatherID will always be the same, since it's an INNER JOIN on
gatherID = userID, so those IDs of 3 and 4 will never exist in the query,
only 5. It looks like you need to be joining on name, not ID:
That would get you userID '3' for 'tiff' and userID '4' for 'mek' (assuming
that 'meka' is a typo in the users table).
Similar Messages
-
Parameter passing problem to standard JSP iView
Hi,
I'm trying to launch a standard iView with some a parameter directly from the browser by calling the url http://<server>/<iview>?<param>=<value>
The iView ID is com.sap.pct.hcm.ecmmain.approval and by looking at its details from the content catalog I saw there was a property called CREVI. I would like to fill this in but the iview doesn't respond to the URL params at all. Setting them staticly by editing the iView works perfect.
I have also checked that the "Parameters to pass from Page Request" property includes * and excludes some other properties than the one I'm testing.
I thought this was going to be simple but can't just make it work..I guess I'm missing something basic or the property can't be used? Any ideas?
Thanks,
MikkoHi Mikko,
We have found inconsistencies with regards to parameter passing in the URL, sometimes they are read and sometimes not. I suggest that you try to change the order of the parameters as this can affect if its read. I also believe other parameters can interfere whether or not it is read so try various scenarios.
Cheers,
John -
How to solve parameter passing problem?
I have a report that can be place on any Portal page and it requires several parameters.
The report is based on a query:
select bldgname
from building
where (bldcntry = :cntry or :cntry is null) and
(bldstate = :state or :state is null) and
(bldcity = :city or :city is null)
The LOVs for the bind variables need to be linked, i.e. State LOV is function of Cntry LOV and city LOV is function of both cntry LOV and state LOV.
I can't use the Customization screen because it doesn't allow linked LOVs.
I can't use a master detail form because I would have to create a table consisting of the 3 bind variables, M/D forms don't work with views. Since this is just one of 60 reports I have to do, it would mean adding 60 of these pseudo tables.
I was thinking of placing a form, which can have linked LOVs, on the same page as the report, and then calling the page and passing the values of the LOV to three page parameters. Unfortunately, I need to dynamically determine the url of the page the report and form are on and p_page_url doesn't seem to be accessible from a form, although it is from a report, I have a TAR on this issue.
So I wonder if anyone has an idea how to solve this problem?
LarryHi,
Try calling the report from the success procedure of the form
Here is an example which calls the report from the success procedure of the form.
declare
flightno number;
ticketno varchar2(30);
blk varchar2(10) := 'DEFAULT';
l_url varchar2(2000);
begin
flightno := p_session.get_value_as_varchar2(
p_block_name => blk,
p_attribute_name => 'A_FLIGHT_NO');
ticketno := p_session.get_value_as_varchar2(
p_block_name => blk,
p_attribute_name => 'A_TICKET_NO');
l_url := 'http://domain/pls/reportname.show?p_arg_names=flightno&p_arg_values='||flightno||'&p_arg_names=ticketno&p_arg_values='||ticketno;
call(l_url);
end;
Thanks,
Sharmila -
URGENT: Parameter Passing Problem
In Forms 6i I am sucessfully passing parameters from one form to another. The problem is I want the receiving form to execute the query at startup. I cant run execute_query; unless the form is in enter_query mode. In a trigger execute_query cannot be run in Enter_Query mode. So I am stumped. Ideally I wanted to try:-
-- Initailise Block Items with Parameters --
Enter_Query;
:interview.Position_ID := :PARAMETER.p_Position_ID;
:interview.Candidate_ID := :PARAMETER.p_Candidate_ID;
Execute_Query;
Obviously the reasons above stop me doing the above example.
Please HelpHello
This example is base on the dept table.
Please try this
trigger ->WHEN-NEW-FORM-INSTANCE
:GLOBAL.my_var := 10;
trigger ---> PRE-QUERY
SET_BLOCK_PROPERTY('emp', DEFAULT_WHERE, 'DEPTNO= ' ||:GLOBAL.my_var);
it works fine in my little example put the trigger on Forms level.
Best regards Patrick. -
Parameter passing problem between TS-LabView
Hi
I am getting crazy with this problem. Basically I have a vi, in which you can change some parameters of a step type. I put this step type into a seq, open the Edit substep (the problematic vi), and I can change some parameters, respectively: Compare, Command, Command_params and MasterData (see attached image). When I press the OK button in my "Edit" vi, the parameters are saved into the TS variables of my step type, without failure.
The problem pops up only, when I push the CANCEL button, I expect that all the TS parameters keep the original value. This is the case...except one variable, called "Compare". All the others keep the previous values, so Command, Command_params and MasterData are ok. "Compare" is initialized to empty string :-(
Originally "Compare" was a Boolean, it was always initialized to FALSE, when I clicked the cancel button. I thought that is the problem.
Then I changed it to Ring. It was initialized always to 0.
Then I tried numeric, enum etc, always was initialized to 0, or in case of string, an empty string.
Why is it so? I attached my vi, you can look into it.
Attachments:
params.jpg 42 KB
Edit_APM_ATAPI.vi 222 KBHi,
In your first frame, you have connected all the other inputs to there respective outputs using local variables except for one, Compare and Compare out.
Shouldn't you connect this together so the output picks up what you have inputed to the VI.
What are you inputing into Compare, because if you are passing an empty string then that control seems to except the empty string, Even though you have the setting Allow Undefined strings disabled.
I'm using LabVIEW 7.1
Regards
Ray Farmer
Regards
Ray Farmer -
Add URL Parameter to Validator
Hi, my problem is this. I have a jsp page that uses a url parameter passed to it by the link, i.e <a href="userInfo.jsp?id=nav">. The id value is then used to conditionally populate the jsp drop-downs etc.
On a validation error the page is redisplayed, but the id parameter is not present and it gnarls the jsp output. Is there a way of giving the redisplayed page the id value that was originally present?
Thanks for any help.I would add a hidden input to the page with the expected name and value. In this case it might be best to use straight HTML instead of the inputHidden component.
-
Problem passing Session variable as URL parameter?
Hi,
I am trying to create a multiple page entry form using
coldfusion session. But I am having some problem when passing the
session variable to url parameter. For test purpose I have created
the following code:
<cfif Not IsDefined("SESSION.AE")>
<!--- If structure undefined, create/initialize it
--->
<cfset SESSION.AE = StructNew()>
<!--- Represent current form srep; start at one --->
<cfset SESSION.AE.StepNum = 1>
</cfif>
<cfif IsDefined("Form.GoBack")>
<cfset SESSION.AE.StepNum = #url.StepNum# - 1>
<cfelseif IsDefined("Form.Next")>
<cfset SESSION.AE.StepNum = #url.StepNum# + 1>
</cfif>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<form method="post"
action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
<input type="submit" name="GoBack" value="Back">
<input type="submit" name="Next" value="Next">
</form>
</body>
</html>
When run it I get the following error:
The value "" cannot be converted to a number
The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm: line
11
9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
10 : <cfelseif IsDefined("Form.Next")>
11 : <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
12 : <!---<cfset SESSION.AE.StepNum = #url.StepNum# +
1>--->
13 : </cfif>
I couldn't figure out where is the problem. Any help is
really appreciated.
Thanks in advance.You are mixing up your gets and posts aren't you?
You have your form method set to post which creates form
variables not
url variables. So when you try to use the url variable to set
your
session it does not exist.
Change your SESSION.AE.StepNum = #url.StepNum# to
Session.AE.StepNum =
form.StepNum, note there is no need for the #'s.
OR
change your form method="post" to form method="get"
Nagelia wrote:
> Hi,
>
> I am trying to create a multiple page entry form using
coldfusion session. But
> I am having some problem when passing the session
counter to url parameter. For
> test purpose I have created the following code:
>
> <cfif Not IsDefined("SESSION.AE")>
> <!--- If structure undefined, create/initialize it
--->
> <cfset SESSION.AE = StructNew()>
> <!--- Represent current form srep; start at one
--->
> <cfset SESSION.AE.StepNum = 1>
> </cfif>
> <cfif IsDefined("Form.GoBack")>
> <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
> <cfelseif IsDefined("Form.Next")>
> <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
> </cfif>
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> </head>
> <body>
> <form method="post"
action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
> <input type="submit" name="GoBack" value="Back">
> <input type="submit" name="Next" value="Next">
> </form>
> </body>
> </html>
>
> When run it I get the following error:
>
> The value "" cannot be converted to a number
>
>
> The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm:
line 11
>
> 9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
> 10 : <cfelseif IsDefined("Form.Next")>
> 11 : <cfset SESSION.AE.StepNum = #url.StepNum# +
1>
> 12 : <!---<cfset SESSION.AE.StepNum =
#url.StepNum# + 1>--->
> 13 : </cfif>
>
> I couldn't figure out where is the problem. Any help is
really appreciated.
>
> Thanks in advance.
>
>
>
> -
How to pass mysql query id through url parameter to a detail page
Hi there,
I am a newbie to JSP and I am trying to pass a url parameter to a detail page so that it will query a mysql data query to show the details of that query. How can I write the query on the details page so that it will display the query results on the page. eg select * From data Where = "passed_url parameter_ value". Please i need urgent help on this please.<Acknowledged>
which should be strongly cautioned against even for "newbies".
</Acknowledged>
Right, but the code you posted will "work" in a very harmful wayNot always, I used normal Statements last year and I had no problems.
Even with pretty capible code brakers trying to cause $h!t with my application.
Just check for invalid datatypes, and for SQL Injections remove stuff like ' or replace with `
But yes PStat... are the better way. -
Passing date criteria in url parameter
Hi,
I want to filter a recordset by a given date.
Create the recordset, if I use a runtime value of #27/11/06#
all the records for that date are returned.
However, when I try to pass the same information through an
URL Parameter it doesn't work.
Is there a problem with passing this info in that way?
Thanks, Mark.No, should be absoloutely fine. The prob is most likely to do
with your SQL
statement.
As a test, don't display any records. At the top of your
page, try
outputting the completed SQL statement onto the page to see
what it looks
like. The problem being you may need to add the # symbols
manually. Should
look something like
"SELECT * FROM TableName WHERE DateField = #" &
URLParameter & "#"
HTH,
Piers -
Hi,
I would like to pass a url parameter, with the following format, to a get method.
http://myserver/send?param-id=1234@5678
I was able to do it using the HTTPService send(parameter) but the characters "-" and "@" are changed. I want to send the parameter as is, can anyone teach me how?
Thanks in advance..rockstar888,
for a GET, you can only use things which are permitted characters in a URL string. Hence some characters won't work just as they are. Now, we all know some browsers are very accommodating with things like this (eg a space character should be sent as %20 but if typing in a URL you can usually get away with it in a browser), but you have to be more strict in this situation. One way is to have some encode/decode stuff at each end. Another (if you are going to use the result simply as a URL at the other end) is just to let the URL encoding go on its way without problems. Another is to use POST rather than GET, since POST variables are passed like entries in an HTML form rather than a querystring, so you have more flexibility. To do this you just use the method property of HTTPService.
Richard -
Passing custom URL parameter to a FPM app
Hello,
I am facing a problem when trying to pass an URL parameter to a GAF FPM application.
The standard way by adding a parameter to the WD application and adding a parameter to the default plug in the window doesn't work for FPM... at least in my case.
Does anyone know how URL parameters work with the FPM framework?
Thank you and BR,
ChrisYou just need to declare parameters which you will be using in WD Application - Parameters tab.
To fetch parameters for application which is using FPM, you have to use following piece of code -
wd_this->app_param = wd_this->mr_fpm->mo_app_parameter.
CALL METHOD wd_this->app_param->get_value
EXPORTING
iv_key = 'INTERFACE_MODEL'
IMPORTING
ev_value = wd_this->lv_interface_model.
CALL METHOD wd_this->app_param->get_value
EXPORTING
iv_key = 'MODE'
IMPORTING
ev_value = wd_this->lv_mode.
Here wd_this->mr_fpm holds FPM reference and is of type ref to IF_FPM
and wd_this->app_param holds FPM parameters reference and is of type IF_FPM_PARAMETER.
After getting reference I'm calling methods to get individual application parameters by sending their names.
We called this in DOINIT of component controller.
Regards
Manas Dua -
How can I pass empty value in URL Parameter
Hi,
I am passing different URL parameters to one page, to filter
the recordset on that page. How can I pass an empty value in the
URL parameter so that the recordset in unfiltered?
The URL parameter is based on one field of the database:
ContentType. So, the link would be to
default.asp?ContentType=Event
and then all records that have the ContentType field in the
DB as Event are displayed. Is it possible to use this system to
pass an empty parameter so that all records are displayed?
Thanks
Ian?ContentType=All
<% if (ContentType == "All")
Build recordset w/o filtering
ASP is rusty, but those are the basics.
"iandobie" <[email protected]> wrote in
message
news:e8im80$q7m$[email protected]..
> Hi,
> I am passing different URL parameters to one page, to
filter the recordset
> on
> that page. How can I pass an empty value in the URL
parameter so that the
> recordset in unfiltered?
> The URL parameter is based on one field of the database:
ContentType. So,
> the
> link would be to
> default.asp?ContentType=Event
> and then all records that have the ContentType field in
the DB as Event
> are
> displayed. Is it possible to use this system to pass an
empty parameter so
> that
> all records are displayed?
> Thanks
> Ian
> -
Pass Url Parameter To Portlet in a Tab Page
Ciao,
i have a portal page with TABS. I have pl/sql portlets that read the url, then they pass parameters to the url. With "wwpro_api_parameters.get_value" and the session i am able to pass parameters via URL and to know if i have changed tab or not.
My question is: how cai i "CLEAN" the url if i change the tab? As you know, if i change tab, only the "_pageid" parameter change, and not the whole url.
i.e.: http://misun13:7777/servlet/page?_pageid=202,204,217&_dad=portal30&_schema=PORTAL30&par_name=5
I change the tab: http://misun13:7777/servlet/page?_pageid=202,206,217&_dad=portal30&_schema=PORTAL30&par_name=5
But i want to RESET the parameters! That is i want: http://misun13:7777/servlet/page?_pageid=202,206,217&_dad=portal30&_schema=PORTAL30
It seems i can't change the standard behaviour of the TAB.
Does anybody know how to do that?
Thanks in advance,
EttoreHi Ettore,
It is true that when you pass parameters, they show up on the URL and even when you change tabs the messy long URL will show up.
One way to avoid this, is to use the session store instead and save and access the parameter values from the session storage itself.
For more details on using Session Storage, check the PDK documentation for using the session store.
http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/implementing.session.storage.html
Another thing, you may try is using the owa_utl.redirect to specifically redirect to a clean URL. But i suspect that if your parameter values are still active, they will populate the URL in any case.
For further details on parameter passing, check:
http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/guidelines.parameter.passing.html
Hope this helps.
Mohana -
How to pass a querry as a url parameter
Hi Forum
I need to pass an sql query as a url parameter I wrote the following code:
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly");
applicationURL="?distACN="wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN()"&type="type"&query="strGreportQuery;
but got the following exception:
ecom.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=../../local/AgencyFee_SettlementSummaryReport/Ko_AgencyFee_PrinterFriendly?type=1&query=SELECT v.PAY_TO_ACN_NAME PAY_TO_ACN_NAME, v.DIST_ACN DIST_ACN, v.DIST_NAME DIST_NAME, v.AP_CHECK_NBR AP_CHECK_NBR, v.BATCH_NBR BATCH_NBR, TO_DATE(v.TRANS_DATE) TRANS_DATE, TO_DATE(v.AP_CHECK_DATE) SETTLE_DATE, Sum(v.QTY_DELIVERED) QTY_DELIVERED, Sum(v.TOTAL_AMT) TOTAL_AMT, Min(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_BEG, Max(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_END, (select sum(vr.qty_delivered) from VRF_ERR_DETL vr where vr.ccf_acn_nbr=v.dist_acn and to_char(vr.batch_nbr)=v.batch_nbr) TOTAL_ERR_REC From VRF_VOL_DETL v WHERE v.PAY_TO_ACN = 3182 AND v.AP_CHECK_NBR = 0 GROUP BY v.PAY_TO_ACN_NAME, v.DIST_ACN, v.DIST_NAME, v.AP_CHECK_NBR, v.BATCH_NBR, v.TRANS_DATE , v.AP_CHECK_DATE ORDER BY v.DIST_ACN, v.AP_CHECK_NBR, v.BATCH_NBR
Can someone help me out on this?
Thanks & Regards
Jaspreet KaurHi jaspreet,
you can try the following:
HashMap params = new HashMap();
params.put("distACN", wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN());
params.put("type","type");
params.put("query",strGreportQuery);
try {
String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly", params);
} catch (Exception ex) { -
ADF Faces + ADF BC : how to pass an url parameter to a backend business ser
Hi,
I'm using latest JDev studio version SU 3.
My project is using ADF Faces with BC4J in the service layer.
I have a backend application module which exposes a method taking a String parameter as an input (ex: void setUsername(String username))
I need to have a jspx page which reads a parameter passed in the url (http://localhost/faces/registerUser.jspx?username=john) and send it to the backend service method when a submit is raised on a clicked button.
It's pretty simple when using inputtext for example but not obvious if I want to use urm param instead of inputtext.
How do I do this ?
ThanksHi,
Thanks a lot for your answers.
The link http://www.it-eye.nl/weblog/2006/06/12/passing-a-url-parameter-to-model-using-adf/ is no more reachable.
The following EL expression work for displaying the parameter inside an outputText component :
#{facesContext.externalContext.requestParameterMap[yourParameter′]}
The parameter is not sent to the business service when the button is clicked.
Thanks,
Seb.
Maybe you are looking for
-
Hi, I Have a problem with Tcode ASKBN. We suspect that the error was caused a late correction journal in February on foreclosed sales, which after backdated posting and we FORGET to repeat run ASKBN. On March we execute ASKBN with test run Clicked a
-
How Do I create an Admin account?
Hi This sounds silly but.... How do I set up an administrator account ? I am using DW CS3 and ADDT and PHPMYADMIN I can create a table with a level_user field and al the other usual fields I can use the login wizard and / or the ADDT control panel to
-
I get "error code -8058" when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder. "Alt +Drag" works. Any ideas?
-
Insert taking long time.
Hi, I am inserting 10 milion records into a table using procedure it's taking nearlly one hour to insert all 10 million records. So that I have used FORALL bulk collect along with APPEND hint and the time is reduced to 20 minutes. Is there any other
-
Hello gurus: I have a very basic question. I have 2 planning books...one called Hospital Marketing and one called Out Patient Marketing. Am I allowed to have the same name for a dataview in each one of them. For instance, I have a Dataview called