Using Form to pass value to query parameters in the selct part of query
I created a form in Access 2007 to pass 2 values to an Access query. I am doing this to create delimited output (very large) with the parameters included in the selected data. The select works and is something like this:
SELECT "^"+!FORM!EXPORT2DAT!PREF_VALUE+"_"+Replace(UCase([column_1])," ","_")+"^|" AS OUTPUT_column1, "^"+!FORM!EXPORT2DAT!COMPANY_VALUE+[COLUMN_3]+"
([COMPANY_VALUE])"+"^|" AS OUTPUT_column2,....................
The form has text boxes for the values I want to pass PREF_VALUE and COMPANY_VALUE to the query parameters, and an execute button to open the query when clicked.
However when I enter the values and click the execute button, I still get the parameter boxes for the 2 parameters. 1 for this: !FORM!EXPORT2DAT!PREF_VALUE, and FORM!EXPORT2DAT!COMPANY_VALUE. I thought I was filling in with the form text box values.
Can I use the form's text boxes to pass values to concatenated using(+) columns in the select part of the query as I'm doing above?
Thanks in advance for your response.
I have never seen a select statement like that!
For query criteria I would use this --
[FORMS]![EXPORT2DAT]![PREF_VALUE]
and [FORMS]![EXPORT2DAT]![COMPANY_VALUE]
Build a little, test a little
Similar Messages
-
Query a second form from another form by passing value
Hi,
I have two forms. I am trying to query a second form from another form. I have managed to display the query results in the second form by passing value from the first form. I did it according to the details in the Oracle 9ias Portal Technical FAQ html file.
It works fine when there is already a row in the first form. When I insert a new row in the first form and query the second form which has key from the first form, there is no matching rows displayed which is correct but detail action mode is 'NONE' for all detail rows.
According to the FAQ, it says the following:-
"When the called form is started, it executes a query with the supplied condition (in this case, "where deptno=10"). If the query is successful, the matching rows are displayed in Update mode. If no matching rows are found, the form starts in Insert mode."
It does not happen for me. I get NONE mode for no matching rows. Is this a BUG ? I am working on Portal version 3.0.9.8.0.
Is there something wrong in the code I wrote ? I would like to have all the detail mode as Insert.
Here is the following code I wrote on SUCCESSFUL SUBMISSION OF THE FORM.
declare
my_url varchar2(1000);
v_deptno number;
begin
v_deptno := p_session.get_value_as_NUMBER(p_block_name => 'DEFAULT', p_attribute_name => 'A_DEPTNO');
my_url := 'PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1268491962&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=deptno&p_arg_values='||LTRIM(TO_CHAR(v_deptno))||'&p_arg_names=_deptno_cond&p_arg_values=%3D';
go(my_url);
end;Hi,
The behaviour is OK as in the MD form there are two states "Save" and "Query and Save" and when the form is in "Query and Save" mode that means you can use it for both Query aswell as Save which is decided by your "Master action" if that is None it is used for Query , for Insert you will have to select Insert ,this is the Insert Mode behavior.
If you open a new MD form that is also in the "Query and Save" the same behaviour will be there.
Hope this answers your query.
rahul -
Use context to pass value between JPF and Java Control
hi,
Can we use context to pass value between JPF and Java Control? It works if i m using InitialContext in the same machine but i dun think it will works if i put Web server and application server in different machine. Anyone have an idea how to do it?
I also want to get the method name in the onAcquire callback method. Anyone knows how to do this?
thks
?:|Hi.
Yoy can the next options for make this:
1. Pass your values in http request.
example: http://localhost/index.jsp?var1=value1&var2=value2&var3....
2. You can use a no visible frame (of height or width 0) and keep your variables and values there using Javascript, but of this form, single you will be able to check the values in the part client, not in the server. Of this form, the values of vars are not visible from the user in the navigation bar.
Greeting. -
I have a treeView in my form1 designer. The treeView variable name is: treeViewMS1
When i'm running my program the treeView is automatic expanded to level 1:
Now if i click on the numericUpDown and change the value to 2 then:
So the expanded part is working fine when i change of the numericUpDown by one up the expanded is working fine.
Now when it's on level 2 and i change the numericUpDown back to value 1 that's level 1 instead get back to my first screenshot Expanded level 1 it's getting back to the root level 0.
and i want that the collapse part will move only one level back but it dosen't matter if i'm on expanded level 2 or 3 or 5 it will allways jump to 0 to the root.
This is the numericUpDown value changed event:
decimal oldValue;
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
if (numericUpDown1.Value > oldValue)
ExpandToLevel(treeViewMS1.Nodes, (int)numericUpDown1.Value);
else
CollapseToLevel(treeViewMS1.Nodes, (int)numericUpDown1.Value);
oldValue = numericUpDown1.Value;
ExpandToLevel method:
void ExpandToLevel(TreeNodeCollection nodes, int level)
if (level > 0)
foreach (TreeNode node in nodes)
node.Expand();
ExpandToLevel(node.Nodes, level -1);
And CollapseToLevel method:
void CollapseToLevel(TreeNodeCollection nodes, int level)
if (level > 0)
foreach (TreeNode node in nodes)
node.Collapse();
CollapseToLevel(node.Nodes, level - 1);I solved it this way:
I solved it like this: In the Form1_Load event i did:
SetToLevel(treeViewMS1.Nodes, 1);
In my case i wanted it to begin by default in level 1.
Then in the numericupdown1 changed value event:
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
SetToLevel(treeViewMS1.Nodes, (int)numericUpDown1.Value);
Then the method SetToLevel:
void SetToLevel(TreeNodeCollection nodes, int level)
foreach (TreeNode node in nodes)
node.Collapse(false);
ExpandToLevel(nodes, level);
And last the method EXpandToLevel:
void ExpandToLevel(TreeNodeCollection nodes, int level)
if (level > 0)
foreach (TreeNode node in nodes)
node.Expand();
ExpandToLevel(node.Nodes, level -1);
And now it's working perfect like i wanted it to work. When changing the numericupdown value it's changing the node tree expand/collapse levels. -
Approval Procedure - how to pass value to query
I want to do an approval procedure for checking GRPO Qty which greater than PO OpenQty by Query.
How to pass the GRPO DocEntry and LineNum to the query, and how can check the passing value is correct or not?I have tested one row only, but also not work.
Here is the query I used.
select case when (t1.openqty < $\[PDN1.Quantity.0]) then 'TRUE' ELSE 'FALSE' END as RESULT from pdn1 t0
right outer join por1 t1 on t1.docentry = t0.baseentry and t1.linenum = t0.baseline
where t1.docentry in ($\[PDN1.BASEENTRY.0])
group by t1.docentry, t1.linenum, t1.quantity, t1.openqty
having (sum(isnull(t0.quantity,0)) < t1.quantity)
order by t1.docentry, t1.linenum, t1.quantity, t1.openqty
If the pass value is correct, the result should be like this.
TRUE
Is the query wrong? Any suggestion?
Thanks. -
Passing Values to URL Parameters in HTTP Connection SCOT
Hi ,
I have created a new node in SCOT as HTTP. In that i am using one URL as HTTP Connection , for that URL have to pass some input values ( eg: User name , password ). Right now i am hardcoding these values in the URL, But i need to pass these input values to the URL dynamically. Is there any way to pass the values to the URL parameters .
Regards
Bala..Hi Bala,
Did you ever get this resolved? I have a similar requirement but still cant find a way to do it. I even thought about creating an RFC Destination of type H and entering the user name and pwd in the logon details. But the problem wih this is that the URL for the RFC destination is static and cant really be changed.
Be interested to hear your thoughts.
Alon -
B1out - B1isql - Pass value of query to insert statement.
Experts,
Perhaps it is because it is late and I am very tired, but I feel as though I am overlooking some obvious solution to the following scenario.
I have created a scenario that is making a SQL Call to a database, and I need to pass the values from that query to a table in a B1 DB.
I am using an outbound channel of B1, and the B1isql type.
here is my issue,
I know that I can pass the value of atom0 JDBC:JOBID to my Field tag.
However, the insert statement uses the tag attribute value="" to pass the values to the DB.
<Table id="invoicesource" keylist="jobid" task="A" del="">
<Field id="JOBID" value="" wrapchar="False"><xsl:value-of select="jdbc:JOBID"/></Field>
</Table>
I'd like to be able to pass the <value-of select= />, into the value="" attribute instead.
Any insight would be greatly appreciated.
warmest regards,
Lucas FischerI used standard SQL out instead, since it was for custom DB object, and not SAP B1 table, issue resolved.
Edited by: Lucas Fischer on Jun 28, 2011 12:01 PM -
Passing values to query according to text and not key
Hi,
I have a query that accept the get from input filed customers values. the values should be the customers key.
I would like to pass text values to the query and want to get all customers that the texts exists in text description of the customers.
Can I do such thing?
Thanks
AmiAmi Halm,
You will need to create your own web service to acomplish this, the following artice illustrates a similar example.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7000a4db-d4e2-2a10-ebaf-c6e1de637dbe
Regards,
Ahmed Salah -
Forms Search passing values to Search Site
I want to add a forms search field that takes the user input and launches a new tab or window to the target URL that uses the parsed text as its search value.
The html I wrote is:
<div>
<form method="get" action="#" target="_blank" onsubmit="window.location='http://northfieldtal.tlcdelivers.com:8080//?config=default#section=search&term='+this.term.value;">
<label>NTAL Catalog Search:
<input type="text" class="searchform" name="term"/></label>
<input type="submit" class="searchform button clickable submit" value="Search"/>
</form>
</div>
This works but it puts the new tab before the existing one. How do I change that behavior?Hi Narlo56,
I'll help you move this case offtopic. For web development related issue, you can choose ASP.NET forum:
http://forums.asp.net/
Regards,
Barry Wang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
No data found when using form to add value
So I'm working on designing an application where I can move lets say, an order, throughout three steps. Each of these steps have a table containing the orders within that particular step. In the first table, I have created a link column that directs the primary key of the row in step 1, into a form for the table on step 2. I have created a separate form for this process because I found that if I used the same form that I created at the time of the report, I receive another error because that form has a fetch row process that is used for editing a row. In this new form, I have deleted the fetch process because it produces another error and I only need the primary key fetched which is done by the link column in the report. When I implement a fetch row process, I get the following error:
is_internal_error: false
ora_sqlcode: 100
ora_sqlerrm: ORA-01403: no data found
component.type: APEX_APPLICATION_PAGE_PROCESS
component.id: 627741908351057658
component.name: FRP_on_OCS
error_backtrace:
ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 618
ORA-06512: at "APEX_040100.WWV_FLOW_DML", line 317
ORA-06512: at "APEX_040100.WWV_FLOW_PROCESS", line 322
When I remove the automated fetch row process, I get a ORA-01403: no data found error
Any ideas?
Edited by: switbeck on May 28, 2013 1:54 PMI found out that it seems that by using the link column, it thinks that I am trying to edit data in the table, but I am not. I am trying to add a row to a new table that has a PK/FK relationship with the first table by using a link column. Any workaround for this?
Thanks,
Steve -
How to pass values to be displayed on the report?
I have an ASP.Net page that has values from the user that needs to be displayed in the page header of the report. Those values need to be passed to the report.
I am using Crystal Reports 2011. The code behind for ASP.Net page is written in VB.Net.
I had thought of using Parameter fields in the report and using the SetParameterValue method of ReportDocument but I am not familiar with using Parameter fields.
How to set up the report to do this?
Sincerely,
Keith JacksonHi Keith
DJ has some very good suggestions, but the first thing we want to do is to make sure the report works in the designer as you want it to. Reading this thread, I'm a bit unsure if the report does actually work in the designer - can you please comment on that?
If it does, I like to go from simple as far as coding is concerned. In this case, that would mean not worrying about the parameters or logon and let the report engine do the heavy lifting for us:
Create a new project. Throw a CR viewer on a form and add one line of code in page load:
CrystalReportViewer1.ReportSource = <path to the report>
The engine will prompt for the db logon as well as the parameters. Fill those out. The report should then display on the screen.
From here we can get fancy and add DB logon code as well as the parameter code.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
How ?? Pass value from one procedure to the others.
I'm thank you everyone visited my Thread.
This is my abbreviate program. I've a procedure "proc_check_item" that have many conditions and "proc_item_number" get value (v_stmt)from "proc_check_item".
-- proc_check_item --
v_stmt varchar2(100);
If conditions1 then
v_stmt := 'and item_number between 1000 and 2000';
package.proc_item_number(v_stmt);
elsif conditions2 then
v_stmt := 'and item_number >= 1000';
package.proc_item_number(v_stmt);
elsif
v_stmt := 'and item_number <= 2000';
package.proc_item_number(v_stmt);
end if;
-- proc_item_number(p_stmt in Varchar2) --
cursor cur_01 is
select item_01, ....
from table_a
where ...
and ...
&v_stmt <--- this point!!!
How can i do to passed v_stmt from
"proc_check_item" to "proc_item_number".
I'm used &,||, ... its does not work pls. help me
---- If its right it should be -----
cursor cur_01 is
select item_01, ....
from table_a
where ...
and ...
and item_number between 1000 and 2000
cursor cur_01 is
select item_01, ....
from table_a
where ...
and ...
and item_number >= 1000
It's look like at REPORT that i can used 'place holder parameter' to support this query but in this procedure !!
How can i do..
Thank you for your kindness ...
Message was edited by:
Anonymous
Message was edited by:
AnonymousSomething like this:
-- proc_item_number(p_stmt in Varchar2) --
cursor cur_01(v_stmnt varchar2) is
select item_01, ....
from table_a
where ...
and v_stmt = ...
open cur_01(p_stmt) -
Need to pass value from check box to the pl/sql function in process
My requirement is to use single value check box and pass the flag value to the pl/sql function.
The function need to interpret the flag and execute accordingly.
In this case checkbox name is P1_DELETE and it returns Delete, if checked.
Anonymous block with in the process looks as follows:
declare
l_result VARCHAR2(1024);
begin
l_result := test_function(:P1_DELETE);
end;Hi Visu,
checkboxes in APEX are handled as arrays, namely APEX_APPLICATION_GLOBAL.VC_ARR2. To pass and process the checked values of checkboxes in a pl/sql function or procedure you could use the following way, assuming you have a checkbox named P1_DELETE with a single return value of "Delete"
DECLARE
l_checkbox_values apex_application_global.vc_arr2;
BEGIN
l_checkbox := :P1_DELETE;
-- calling function test_function processing the value
test_function(NVL(l_checkbox(1), 'SOME_OTHER_VALUE'));
END;If the checkbox is not checked then the array at position 1 is null and you have to process that as you like.
If your checkbox would be a group than the array would be colon separated such as 1:2:3:4 etc. and you would have to loop the array like:
FOR idx IN 1..l_checkbox.COUNT LOOP
test_function(l_checkbox(idx));
END LOOP;Hope that helps.
Andreas -
Using JSPs and passing data from 1 page to the next
I have an application which has a number of JSPs.
JSP1 has some fields and buttons.
One of these buttons is called 'Print'. On pressing this control
is passed to the next JSP2. In this JSP the data is displayed
from the database. It is displayed via some TABLE tags, thus giving
multiple records displayed. There is also a check box against each record and having checked this box - the user can then then press another button which takes the user to another JSP - JSP3 - which gives the user a list of options for printing. They then can do 1 of 2 things - print a report or print some labels.
I have got this to work where there is only 1 record displayed in JSP2.
But where more than one record is displayed in JSP2 - JSP3 does NOT
know how to handle this and says the variable is undefined.
The code I am using to reference the JSP2 variable is
var batchNumber = top.opener.document.printTranscript.batchNumber2.value;
Any help or ideas would really be appreciated.
Thanx
ChrisHi
If you are using JavaScript, try putting data in a Hidden field and perform request.getParameter in the next page, Place data in a Delimited fashion when placing into the hidden field, on the next page split these values and place where you want them to be.
This is a proven method...
Thanks
Swaraj -
Passing value to paramater field in the crystal report
Hai,
I have done the following thing.
1. Created SBO screen using screen painter.
2. Added one text box, button in the screen painter.
3. Created one Windows screen and attached Crystal report viewer.
4. As soon as the button clicked in the SBO screen i am able to open the crystal report.
But now i need values which i have typed in the text box should be passed to the crystal report. how this can be done . I have attached the code please let me know where is the error. I have also created paramater filed in the crystal report name "From_dt".
As soon as the screen opened from SBO. It is asking for discreate value. But i have already passed the value from the SBO. I need to pass the value dyanamical from SBO screen.
Dim oRpt As New Myreport
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim oLI As New CrystalDecisions.Shared.TableLogOnInfo
For Each myTable In oRpt.Database.Tables
oLI = myTable.LogOnInfo
oLI.ConnectionInfo.Password = "sapb1@sql"
oLI.ConnectionInfo.UserID = "sa"
myTable.ApplyLogOnInfo(oLI)
Next
Dim Crviewer As New Frm_rptwaste
Crviewer.CrystalReportViewer1.ReportSource = oRpt
Dim ParameterField1 As New CrystalDecisions.Shared.ParameterField
Dim ParamterFields As New CrystalDecisions.Shared.ParameterFields
Dim ParamterDescreteValue1 As New CrystalDecisions.Shared.ParameterDiscreteValue
ParameterField1.ParameterFieldName = "From_dt"
ParamterDescreteValue1.Value = txtcode.Value
ParameterField1.CurrentValues.Add(ParamterDescreteValue1)
ParamterFields.Add(ParameterField1)
Crviewer.CrystalReportViewer1.ParameterFieldInfo = ParamterFields
Crviewer.CrystalReportViewer1.RefreshReport()
Crviewer.ShowDialog()Hi Suresh,
Instead of Parameter, you try Formula field and assign desired value to formula.
HTH
B Ravi Shankar
Maybe you are looking for
-
Hi, I have been trying for push Notification Services in Windows 8 Store Apps. I am requesting For notification channel in the following manner publicasyncvoidregisterChannelForNotification( try TileUpdateManager.CreateTileUpdaterForApplication().Cle
-
i got my mac repaired in france and now i cant get english on internet or system prefrance is all in french.
-
1280 x 800. Is this the default display resolution for the MacBook? Sorry for this trivial question, but I am in a hotel room using the WiFi here and one of the web-pages I customarily view looks different. Of course this is really rather minor, but
-
Remote disk on imac wont work with macbook air.
it says that it can't find the original cd. But it shows up on the desk top ??? Please help. Thanks
-
Client in linux , server in win NT RMI not working
I started client in a linux system and the server program in win NT system connected in a lan . It is giving some error while the same ran when I used two win NT systems . Please help me .