Execute javascript with input parameters of a taskflow
Using JDev 11g PS4
I have a taskflow that uses some javascript. When the taskflow has been loaded, I need to execute a javascript function that uses 2 input parameters of my taskflow.
I don't really know how I can execute the javascript with my input parameters.
As a test, I have added a commandButton in my taskflow that will do the job:
<af:commandButton id="btnRefresh" text="Open">
<af:clientAttribute name="long" value="#{pageFlowScope.pLong}"/>
<af:clientAttribute name="lat" value="#{pageFlowScope.pLat}"/>
<af:clientListener method="doNavigate" type="click"/>
</af:commandButton>How do I do the same when the taskflow loads instead of needing to push the button.
Please find attached sample based on your use-case:
http://adfsampleapplications.googlecode.com/svn/trunk/JavascriptOnLoadSample.rar
It invokes a javascript function on pagefragment load by passing the input parameters from the taskflow.
Thanks,
Navaneeth
Similar Messages
-
How to add programatically/dynamically input parameters to a taskflow?
I have usecase like this -
I have a taskflow created. But I dont know how many input parameters that I need to define on this taskflow.
Is there any way, by which I can add input parameters to a taskflow programatically? using a MBean or any APIs are available that will enable to do this?When using the task-flow as a region, instead of specifying the parameter individually - you could provide Map as the input parameters with Key being the parameter name and Value being the actual value of the parameter.
Check this sample:
http://adfsampleapplications.googlecode.com/svn/trunk/TaskflowParamSampleApp.zip
Thanks,
Navaneeth -
How to write a SQL query in SAP B1 2007 B with input parameters?
How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?
The syntax like
SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
Thanks,
Gordon -
Error when using Analytic view with Input Parameters
Hi,
I am trying to create an info space based on my Analytic view which has input parameters. The infospace is validated and indexed without any issue. However when I ran the view, I get an error (50011) as it is unable to fetch any results. I tried using an infospace based on Calculation view with input parameters and the explorer view works without any issue.
Has anyone faced similar issues?
We are using HANA SP 6 rev 67 and BI 4.0 SP 4.
Also is there a way to enable input prompts for the users when they refresh the BO Explorer view? If not currently available is there any work around ?
ThanksHello George,
I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
Thanks, -
How to write XSJS Select Query with input parameters
Hello Experts,
I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View
I have tried it the following way:
var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"Test.HL/AddressView\"'
+ 'WITH PARAMETERS(\'PLACEHOLDER\' = (\'$$P_Name$$\', \' Akhil \'),'
+ '\'PLACEHOLDER\' = (\'$$P_City$$\', \' Lucknow \'))';
But it gives me the "Mixed spaces and tabs error".
How should I write XSJS Select Query with input parameters?
Regards,
Rohit>But it gives me the "Mixed spaces and tabs error".
Mixed spaces and tabs has nothing to do with the syntax of the statement. You used both spaces and the tab in the content - which JSLint doesn't like. Remove the beginning spaces of each line and use only one or the other.
The actual syntax of your statement doesn't look right. The problem is that you are escaping the \ when you don't need to if you are using ' instead of " for your string. You escape with \" in the first line but then escape with \' in the 2nd and 3rd line. That is going to cause serious parsing problems with the command. -
Questions on CDS Views with input parameters
Dear Experts,
1. Can we call a CDS View (or generated database view) with input parameters inside an AMDP? I am looking for something similar to the feature in HANA where we can consume calculation view with filters inside SQL Script?
2. I understand we can next CDS Views, but how we can next (call) a CDS View with input parameters inside another CDS View?
Thanks,
GiriHi Thomas,
I get the below error that the CDS View's generated table function cannot take field from AMDP.
I have a requirement to query the CDS View using 2 timestamps (start & end). So, in AMDP I have used the TIME_STAMP and try to pass it to the CDS View
View code:
define view Z_Ngi_Cag_A
with parameters start_ts:abap.dec( 15, 0 ) , end_ts:abap.dec( 15, 0 )
as select from table {
resource_key
where
(begtstmp > $parameters.start_ts or endtstmp > $parameters.start_ts )
and
(begtstmp < $parameters.end_ts or endtstmp < $parameters.end_ts )
I am calling using the below AMDP:
DECLARE iv_start_date TIMESTAMP;
DECLARE iv_end_date TIMESTAMP;
SELECT CURRENT_TIMESTAMP INTO iv_start_date from dummy;
SELECT ADD_DAYS(CURRENT_TIMESTAMP, 30) INTO iv_end_date from dummy;
et_data = SELECT * FROM ZMR_H_CA ( start_ts => iv_start_date, end_ts => iv_end_date );
What could be wrong ? Is this not supported?
Thanks,
Giri -
Call a Graphical Calc view with input Parameters from a Script Based Calc View
Hi All.
I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
WITH PARAMETERS ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
START_DATE and END_DATE are input parameters of the script based calculation view.
Can anyone please help me with the correct syntax for accomplishing this?
Thanks,
GouthamHi Gautham,
One more option what i would like you to try is the below option , here i have just changed the order of passing nothing else.
SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
Regards,
Vinoth -
Calculated view with input parameters
Hello there.
I've created a calculated view with input parameters, which I am going to call it 'VIEW_A'.
This view has been working just fine.
But now I have to create another calculated view and import the last one(VIEW_A) in a projection.
But I got a error when trying to see the data content.
It says :
Error: SAP DBTech JDBC: [2048]: column store error: search table error: [6968] Evaluator: syntax error in expression string;expected TK_ID,parsing '"DT_DOC_MES_ANO" >= [here]and "DT_DOC_MES_ANO" <='
At the 'Problems' panel it says the all the input parameters are unmapped.
What Am I doing wrong? Sorry but I am kind new at SAP world.http://scn.sap.com/message/15489475Hello Tiago,
Could you please let me know if you're able to resolve your issue, I'm getting the similar error when I'm passing alpha numeric values as parameter via my SP.
Thanks for your help in advance!
Regards,
Sathish -
Executing Javascript with button
How can I go about executing javascript with an item level button?
In the HTML DB 2 day tutorial it says this:
Calling a JavaScript from a button is a great way to confirm a request. Oracle HTML
DB actually uses this technique for the delete operation of most objects. For example,
when you delete a button, a JavaScript Alert Box appears asking you to confirm your
request. Consider the following example:
<script language="JavaScript1.1" type="text/javascript">
function deleteConfirm(msg)
var confDel = msg;
if(confDel ==null)
confDel= confirm("Would you like to perform this delete action?");
else
confDel= confirm(msg);
if (confDel== true)
doSubmit('Delete');
</script>
This example creates a function to confirm a delete action and then calls that function
from a button. Note that the function optionally submits the page and sets the value of
the internal variable :REQUEST to "Delete," thus performing the delete using a process
that conditionally executes based on the value of request.
Note that when you create the button you would need to select the Action Redirect to
URL without submitting page . Then, you would specify a URL target such as the
following:
javascript:confirmDelete('Would you like to perform this delete action?');
Can I only do this from a region button?hi,
I have created a javascript form validation and finally (if its passes the validation) I am setting the :REQUEST as doSubmit('GO');
I am calling a conditional process with condition as request = expression1
with expression 1 as GO.
The javascript is as follows
function message_name_not_null(){
if(document.getElementById('P14_MESSAGE_NAME').value.length==0)
alert("Message Name is Mandatory!!");
return;
else if(document.getElementById('P14_MESSAGE_TEXT').value.length==0)
alert("Message Text is Mandatory!!");
return;
else
doSubmit('GO');
My problem is my process is not getting called in button click(I have called the javascript from this button as javascript:message_name_not_null(); in Optional URL Redirect section)
I have specified the :REQUEST value in the branches also.
Any sort of help please..
Thanks in Advance
Kaushik -
Executing a Webi report with input parameters
How can I schedule a BO4 webi report dynamically? I have a set of tables which contains the required parameters for the reports and I need implement a mechanism which will invoke these reports with the parameters. Then I would want the reports to be placed at a specified location. I am told that this can be achieved using webservices integration. I just dont know how. Please advise.
Hi Sukanto ,
Check the below link for dynamic prompt during scheduling
http://scn.sap.com/community/businessobjects-web-intelligence/blog/2014/01/24/dynamic-default-values-with-prompt-in-webi-reports-based-on-bex-queries-in-bo
and file location check below screenshot
It might help you.
Regards,
Anish -
Executing Procedure with default parameters !!
hi want a small help ...
I have a
procedure p1(p1 in number default 2, p2 in number default 3)
begin
end;
When the procedure will be called without passing parameters it will execute with default parameters.
That time I want to dispay message saying
" AS paramters are not passed, procedure is being executed with foll. default parameters:
Param 1 = 2
Param 2 = 3 "
Now issue is how do I capture this condition that , the parameters are being passed and it is using default parameters ?
ThanksThe IF NOT NULL check for the parameters cannot be inside the same procedure becuase when you reach that statement, even though the parameter are not passed to this procedure, at that stage, the parameters will acquire the dfault values already assigned to them. So you never reach the else part of it.
That;s why i said, use third parameter and assign the value to this third parameter from the calling environment.
here is the short test case that might help you to understand better.
SQL> create or replace procedure myproc
2 (p1 number default 1
3 ,p2 number default 2
4 ,parameter_passed char default 'Y') is
5 begin
6 if parameter_passed = 'Y' then
7 dbms_output.put_line('Input values are :'||p1||'='||p2);
8 else
9 dbms_output.put_line('Default values are :'||p1||'='||p2);
10 end if;
11 end;
12 /
Procedure created.
SQL> PROMPT Test for Case one with input parameter values
Test for Case one with input parameter values
SQL>
SQL> declare
2 param1 number := 5;
3 param2 number := 6;
4 begin
5 if param1 is not null and param2 is not null then
6 myproc(param1,param2);
7 else
8 myproc(parameter_passed=>'N');
9 end if;
10 end;
11 /
Input values are :5=6
PL/SQL procedure successfully completed.
SQL>
SQL> PROMPT Test for Case two with no parameter values
Test for Case two with no parameter values
SQL>
SQL> declare
2 param1 number := null;
3 param2 number := null;
4 begin
5 if param1 is not null and param2 is not null then
6 myproc(param1,param2);
7 else
8 myproc(parameter_passed=>'N');
9 end if;
10 end;
11 /
Default values are :1=2
PL/SQL procedure successfully completed.
SQL> -
Hi All..
We are trying to create a Universe (using IDT-Version4.0) on top of the HANA Calculation view. The Calculation view has 4 input parameters, So
in Universe side we have created the respective prompts. For the creation of derived table we have used the following code
SELECT *
FROM "_SYS_BIC"."<schema_name>.<CV_Calculation_View_test>"
'PLACEHOLDER'=('$$IP_A$$','@Prompt(A)'),
'PLACEHOLDER'=('$$IP_B$$','@Prompt(B)'),
'PLACEHOLDER'=('$$IP_C$$','@Prompt(C)'),
'PLACEHOLDER'=('$$IP_D$$','@Prompt(D)')
While validating the above code we are getting an error.
I have attached the snapshot of that error for your reference. Please find the attachment and help me in resolving it.
Thanks in advance.Hello George,
I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
Thanks, -
Using calculation view in excel with input parameters
Hello
I have a calculation view which receives 2 input parameters for a range of dates, when i create the connecction with Excel i get the error "sql processing error: Hierarchy source query: SQL: column store error: search table error: [34092] search on calculation model requires parameters: Required variable $$MyVariable$$ is not set"
I would like to know how can i pass the parameteres from excel to my calculation view??
ThanksI doubt this can be achieved with a native Excel connection. Try SAP Advanced Analysis for Office. (I believe it may now just be called Analysis for Office).
-
GP and VC problem with input parameters
Hi
I have a problem with my GP dynamic approvals..
I am trying to pass the parameters from one level to another level in GP using Visual COmposer screen with input and output parameters.
When I see in NWA, I can see the ouput parameters of Screen1 is passed to input of Screen2 but I am not able to get the values in VC Screen.
This scenario was working fine earlier.
THe VC screen is same for all the approvals , I am doing dynamic approvals using predefined conditional callable object and looping it.
any suggestions..I have solved myself, I am sending html tags from one level to another level like <html></html> - these tags are not allowing VC screen to get all the parameters and they are blocked. I removed the tags, then I am able to get the parameters passed.
-
REST Web Reference with Input Parameters
I am using APEX 4.2.0
I was integrating with remote oracle database with API (Restful)
it's working me fine from APEX Page items with username and password
with static contents that located in the:
Home >Application Builder >Application 179 >Shared Components >Web Service Reference> Edit
Name
URL
Test
View
Updated By
Updated
Created By
Created
GAAS
http://remotehost:port/api/registered
username
47 minutes ago
in the region of:
REST Input Parameters
With the option of
Specified Body with Substitutions
The content is located as static in the source item and I have copied to the below section:
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<registerRequested>
<requestType>register</requestType>
<firstName>IBRA</firstName>
<lastName>ADAM</lastName>
<msisdn>699502112</msisdn>
</registerRequested>
So my question is how can I change the above static that I have received from remote side into the input items
Example
:P95_FIRST_NAME
:P95_LAST_NAME
:P95_MSISDN
Thanks in advanceThe APEX forum is here : Application Express
I'm sure you'll get more help there.
Maybe you are looking for
-
Only want one document open at a time
Can I stop all items created with that program from opening when I open just one document? Sometimes when I open Preview all items that have recently been opened with that application will open. Is there a way to prevent that from happening? Thanks.
-
Why do my Numbers '09 files open in Preview?
Hello guys, I've been having this issue for months, and I'm tired of it. Hopefully, someone can help me out. When I try to open my Numbers files by clicking on them directly, they open in Preview. When I look at the 'Show Info' section of the files I
-
Oracle 8i or 9i Lite Replication
Hello. We are evaluating the use of 8i or 9i Lite in an enterprise environment. The plan is to build an application that runs on a Tablet PC (Windows 98 with pen OS), collect data in the local 8i Lite DB, connect to a phone line, and use replication
-
Printing with Epson 2200 and Lightroom v1.3.1
Ever since installing Leopard and Lightroom v1.3.1 in my PowerMac G5, my Epson 2200 printer produces prints with a very significant magenta cast. Does anyone know of this problem or, better yet, does anyone know how to solve this problem? Thank you i
-
Issues with Failover in SA540?
One of my partners is having an issue that remains unresolved - the case id is SR 613266147 - SA 540 Security Appliance / Configuration issues. The client bought 4SA 540s, 3 for production use and 1 spare. Partner configured and installed and the r