How to open a form on click of a button in infopath
I have created an infopath form on a list. I need to create a button on the pape on click of which the last item created by the user should open. I mean the edit form of that list item should open.
How can we do this ?
Thanks for your response in adv.
Regards,
prajK
Hi,
Per my understanding, you might want to add a button on a page, when clicking it, the last form which is created by the current user will open.
As it might require to query the last form created by current user, custom code would be required.
A solution is that, you can query the URL of the last form created by the current user using JavaScript Client Object Model, generate a button with the URL retrieved
using JavaScript. Then when user open this page, the button will be created dynamically, user clicks it, the last form created by this user will open.
More information about JavaScript Client Object Model:
How to: Create, Update, and Delete List Items Using JavaScript
http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
Common Programming Tasks in the JavaScript Object Model
http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
About how to create a button using JavaScript:
http://stackoverflow.com/questions/7707074/creating-dynamic-button-with-click-event-in-javascript
Thanks
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]
Similar Messages
-
How to open a window on click of a button?
Hi,
I want to open a window(a new browser page) on the click of a button.Can anyone please tell me what i should write in the onAction of the button?
Regards,
Padmalatha.Khi,
1.Declare the following in the implementaion of the component controller
//@@begin others
IWDWindow modalWindow;
//@@end
2.First create a method in the component controller :
public void createExternalWindow( )
//@@begin createExternalWindow()
// create external window
IWDWindow externalWin = wdComponentAPI.getWindowManager().createNonModalExternalWindow
("http://www.google.co.in/", "External");
//Define window position and dimensions according to acreen parameters
externalWin.setTitle("Google");
externalWin.setWindowPosition(WDWindowPos.CENTER);
externalWin.setWindowSize(1280,850);
externalWin.show();
//@@end
3.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
public void onActionexternal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionexternal(ServerEvent)
wdThis.wdGetPopUpCompController().createExternalWindow();
//@@end
Now to create a modal window
1.Declare the following in the implementaion of the component controller
//@@begin others
IWDWindow modalWindow;
//@@end
2.Create a new window "NewPopWindow".Declare the following in the implementaion of the component controller.
public void createModalWindow( )
//@@begin createModalWindow()
//creating the window
IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewPopWindow");
modalWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
//display window in centre
modalWindow.setWindowPosition(WDWindowPos.CENTER);
modalWindow.setTitle("Modal Window");
modalWindow.setWindowSize(400,100);
//opening the window
modalWindow.show();
//@@end
3. destroy the window
public void destroyModalWindow( )
//@@begin destroyModalWindow()
modalWindow.destroyInstance();
//@@end
4.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
public void onActionmodal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionmodal(ServerEvent)
wdThis.wdGetPopUpCompController().createModalWindow();
//@@end
regards,
pinki
Edited by: pinki goswami on Apr 17, 2008 11:42 AM -
How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn-off the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign but in this version I could not do so and my iPad appears slower.
Close inactive apps
1. Double tap the home button to bring up the multi-tasking view
2. Swipe the app's windows upwards to close
3. The app will fly off the screen -
HOW TO OPEN A FORM developed IN 10Gds REL2
HI,
How to open a form developed in 10gdsrelease 2 in 10g release1.
It gives ros error.
Thanks in Adv.
Rup
Message was edited by:
Rup
Message was edited by:
RupMy suggestion would be to try converting the form to XML using <10gHome>\bin\frmf2xml.bat, and altering this XML to look like R1 XML. Simply changing the Module version might do the trick, but probably not.
To see the difference between 10gR1 and 10gR2 XML formats, take a reasonably complex R1 form and convert it to XML. Next, upgrade that same form to R2 and convert it to XML. Compare the two XML files.
Applying the knowledge gained from this comparison, modify the XML from your original R2 form. Try converting back to FMB using <10gHome>\bin\frmxml2f.bat Please share your findings with the forum!
Hope this helps,
Eric Adamson
Lansing, Michigan
PS: It is assumed that you have access to both 10gR1 and R2 installations! -
How to open a FORM developed in 10gds release2 into 10gds release 1 ????
How to open a FORM developed in 10gds release2 into 10gds release 1
Thanks in adv.
Rup
Message was edited by:
RupPlease check out the Forms.
-
How to open the forms in Browser.
Dear all,
can anyone tell me how to open the forms develop in form 6i in browser like Internet Explorer.
Muhammad NadeemHi,
The following Host built-in takes you to the specified site,
Host('Netscape http://www.oracle.com');
Best Regards,
Deepak Rai
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rama Ala ([email protected]):
Hi,
We can open internet browser by using HOST command in FORMS. How to open specific URL into the browser through FORMS.<HR></BLOCKQUOTE>
null -
How to Open multiple form with only one screen painter file
Hi all ,
I want to reopen the form without closing the active form ,i want to use same srf file ..
I have already try it but form already exist error occur .
pl help me , how to do it ?
how to open multiple form with same srf file without closing active forms .
thanks in advance,
msw<?xml version="1.0" encoding="utf-16" ?>
<Application>
<forms>
<action type="add">
<form appformnumber="-1" FormType="-1" type="0" BorderStyle="0" uid="BOE" title="Bill of Entry" visible="1" default_button="1" pane="0" color="0" left="365" top="62" width="801" height="410" client_width="785" client_height="372" AutoManaged="1" SupportedModes="15" ObjectType="">
<datasources>
<dbdatasources>
<action type="add">
</action>
</dbdatasources>
<userdatasources>
<action type="add"/>
</userdatasources>
</datasources>
<Menus>
<action type="enable">
<Menu uid="1282"/>
</action>
<action type="disable">
<Menu uid="5890"/>
</action>
</Menus>
<items>
</items>
<ChooseFromListCollection>
<action type="add">
<ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>
</action>
</ChooseFromListCollection>
<DataBrowser/>
<Settings Enabled="0" MatrixUID="" EnableRowFormat="1"/>
</form>
<form appformnumber="-1" FormType="-1" type="0" BorderStyle="0" uid="BOE1" title="Bill of Entry" visible="1" default_button="1" pane="0" color="0" left="365" top="62" width="801" height="410" client_width="785" client_height="372" AutoManaged="1" SupportedModes="15" ObjectType="">
<datasources>
<dbdatasources>
<action type="add">
</action>
</dbdatasources>
<userdatasources>
<action type="add"/>
</userdatasources>
</datasources>
<Menus>
<action type="enable">
<Menu uid="1282"/>
</action>
<action type="disable">
<Menu uid="5890"/>
</action>
</Menus>
<items>
</items>
<ChooseFromListCollection>
<action type="add">
<ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>
</action>
</ChooseFromListCollection>
<DataBrowser/>
<Settings Enabled="0" MatrixUID="" EnableRowFormat="1"/>
</form>
</action>
</forms>
</Application> -
How to open a form multiple times
pl tell me how to open a form multiple times
HI Sagar,
Before adding the form to SBO
try to get the existing count of the form
as shown below
For int = 0 To objApplication.Forms.Count - 1
If objApplication.Forms.Item(int).TypeEx = FormType Then FormTypeCount += 1
Next
THEN append that with your form type as shown below
objFormCreationParams.FormType=FormType & "_" & FormTypeCount.ToString
Then add the form to SBO
SO every time your form is opened the unique id will like URFORMTYPE_1,URFORMTYPE_2 and so on
Hope this helps
regards
vishnu -
Loading and displaying other form on click of a button using swing
hi,
i've just started with my first ever swing program. i want to load another UI form on click of a button . how can i do that.Sorry for posting last message
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class MainCl extends JFrame
public MainCl()
this.setBounds(100,100,400,300);
btn = new JButton("Click me to show another fframe");
btn.setBounds(10, 20, 250, 30);
this.getContentPane().setLauout(null)
this.getContentPane().add(btn);
btn..addActionListener(new ActionListener()
JFrame frm2 = new SecondFrame();
frm2.setVisible(true);
public static void main(String [] args)
JFrame frm1 = new MainCl();
frm1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm1.setVisible(true);
JButton btn;
class SecondFrame extends JFrame
public SecondFrame()
this.setBounds(200,200,200,100)
this.getContentPane().add(new JLabel("This is NEW FORM"));
} -
How to call an applet on click of a button in core java?
On this, I suggest that if we can call commond prompt on background and then pass the path of the class file of another applet we can open another applet on clicking on the button what u says ? if any suggestions or code u can give it is our pleasure to know that.
If you are asking if you can execute an external process (application/applet) from another application/applet - the answer is yes and no.
Yes. If you have the security settings/policy to do so.
No. This may require a security policy to be allowed - as an applet. -
How to open a form based on the the parameter in another Form
I created a button in a form (FORM1). By clicking this button, I want to open another form (FORM2) based on the a value of one key field in this form(FORM1). Both forms have the same key field.
So, I wrote the following codes behind the PL/SQL Button Event Handler of the custom event for the button that I created in FORM1.
v_inventory_num:=p_session.get_value_as_NUMBER(
p_block_name => "_master_block",
p_attribute_name => 'A_INVENTORY_NUM',
p_index => 1
if v_inventory_num is not null then
portal30.wwa_app_module.set_target('/pls/portal30/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=5958032800&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=A_INVENTORY_NUM&p_arg_values='||v_inventory_num,'CALL');
end if;
end;
I could not open the FORM2 by clicking the button on FORM1.
However,I can open the FORM2 by click the button by using the following code.
portal30.wwa_app_module.set_target('/pls/portal30/PORTAL30.wwa_app_module.new_instance?p_moduleid=5958032800','CALL');
How could I pass the parameter in FORM1 into FORM2 and when the FORM2 is opened if has already been queried with the passed parameter?
Your help would be highly appreciated!
Jeffrey Wei YeHi:
Thank you for reply to my question.
I have tried your codes and apply them the following the form. However, I always got the following error:
Error: (WWV-00000)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
My codes is:
declare
request_no number;
blk varchar2(30) := 'DEFAULT';
l_url varchar2(4000);
begin
request_no := p_session.get_value_as_NuMBER(
p_block_name => blk,
p_attribute_name => 'A_WORK_REQUEST_ID');
l_url := 'portal30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=11880470335&p_arg_names=_sessionid&p_arg_values=&p_arg_names=work_request_id&p_arg_values='||request_no;
portal30.wwa_app_module.set_target(l_url,'call');
end;
then,
I created another form which has two fields and the dattype of pk is varchar2 and change manually put the pk's p_arg_value into the url.
e.g.
l_url:='PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=9029417810&p_arg_names=WORK_AREA_CD&p_arg_values=APP';
portal30.wwa_app_module.set_target(l_url,'call');
However, I still get the error message as below:
Error: (WWV-00000)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
No conversion performed for type INTEGER, value . (WWC-49102)
Your help would be highly appreciated.
Wei Ye -
How to open new form with set value
I have two forms CLIENT and ORDERS who are connected by "client_id" in a one to many relationship [one client can have many orders]. What code to I put in the button so that that when I click on it from the CLIENT table, it goes to the ORDERS form with just the orders that match that "client_id"? The application is in oracle 9i developer using swing.
Here's what I have so far, code to open the form without the binding
//Open Order Form
FormIcdClientApplicationView frameTarget = new FormOrderApplicationView(getPanelBinding());
frameTarget.setVisible(true);
// Close this window
this.setVisible(false);Hello,
This is the Forms forum. I am sure you will have more chance to get answer in the JDeveloper forum.
FRancois -
How to open a link by clicking on a DataGrid row
I have a list of documents that are accessible over the internet. The list is in an XML file which serves as the data source for a DataGrid. What I cannot figure out is how to open the document selected in the DataGrid. I think that I need to change something in the openDocument function (below) but I am not certain what I should change. Any help would be appeciated.
Sample file are below:
Application
viewDocuments.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp();">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.core.Application;
[Bindable]
private var documents:ArrayCollection;
private function initApp():void
this.srv.send();
private function onResult(evt:ResultEvent):void
this.documents=evt.result.data.document;
private function openDocument():void
var docURL:String;
docURL=dgDocuments.selectedItem.url;
navigateToURL(new URLRequest("http://cnn.com/"), "_blank");
//Below does not work
//navigateToURL(new URLRequest("docURL"), "_blank");
]]>
</mx:Script>
<mx:HTTPService id="srv"
url="documents.xml"
resultFormat="object"
result="onResult(event)"/>
<mx:Canvas id="cViewDocumentsContainer"
x="0"
y="0"
width="100%"
height="100%">
<mx:DataGrid id="dgDocuments"
width="600"
height="186"
dataProvider="{documents}"
x="15"
y="74"
doubleClickEnabled="true"
doubleClick="openDocument();">
<mx:columns>
<mx:DataGridColumn headerText="DocID"
dataField="doc_id"
visible="true"/>
<mx:DataGridColumn headerText="Name"
dataField="name"
visible="true"
width="200"/>
<mx:DataGridColumn headerText="Type"
dataField="type"
visible="true"
width="90"/>
<mx:DataGridColumn headerText="File Name"
dataField="filename"
visible="true"/>
<mx:DataGridColumn headerText="Path"
dataField="url"
visible="true" width="200"/>
</mx:columns>
</mx:DataGrid>
<mx:Text x="10"
y="10"
text="View Documents"
fontSize="12"
fontWeight="bold"/>
<mx:Text x="15"
y="48"
text="Double-click on the document below you want to read. The document will open in a new window."/>
</mx:Canvas>
</mx:Application>
Data
documents.xml
<?xml version="1.0" encoding="utf-8"?>
<data>
<document>
<doc_id>1</doc_id>
<name>CNN</name>
<type>URL</type>
<filename>CNN.com</filename>
<url>http://cnn.com/</url>
</document>
<document>
<doc_id>2</doc_id>
<name>Yahoo</name>
<type>URL</type>
<filename>Yahoo.com</filename>
<url>http://yahoo.com/</url>
</document>
</data>
Thanks!
LeeYou need this (removed double quotes):
navigateToURL(
new URLRequest(docURL), "_blank");
If this post answers your question or helps, please mark it as such.
Greg Lafrance
www.ChikaraDev.com
Flex Development and Support Services -
How to open a form action in a popup window?
I have a form that has a submit button and a email button. The email button calls a javascript fuction that will execute a mailform script. everything is working fine, but I would like the output window from the mail formscript to open in a popup, but currently is opening in a blank page.
currently hte output from the mail script will open in a _blank window.
Thanks in advance for your help
Here is the html code:
<FORM name="drop_list" action="<?php echo $editFormAction; ?>"" method="POST" >
<input name="emailForm" type="button" id="emailForm" onClick="sendFormEmail()" value="Email">
<input name="add_patient" type="submit" id="add_patient" onclick=document.drop_list.action='<?php echo $editFormAction; ?>' value="Add Patient">
Here is my javascript code:
function sendFormEmail() //email form
document.drop_list.action = "html_form_send.php";
document.drop_list.target = "_blank";
document.drop_list.submit(); // Submit the page
return true;
and here is the html_form_send.php
<?php
if(isset($_POST['patient_email'])) {
// CHANGE THE TWO LINES BELOW
$email_to = '[email protected]';
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.<br /><br />";
echo $error."<br /><br />";
echo "Please go back and fix these errors.<br /><br />";
die();
// validation expected data exists
if(!isset($_POST['patient_name']) ||
!isset($_POST['patient_email']) ||
!isset($_POST['textBox']) ||
!isset($_POST['doc_comment']))
// died('We are sorry, but there appears to be a problem with the form you submitted.');
$first_name = $_POST['patient_name']; // required
$email_from = $_POST['patient_email']; // required
$comments = $_POST['doc_comment']; // required
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
$error_message .= 'The Patient Email you entered does not appear to be valid.<br />';
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
if(strlen($comments) < 2) {
$error_message .= 'The Comments you entered do not appear to be valid.<br />';
if(strlen($error_message) > 0) {
died($error_message);
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
// set subject line
$email_subject = "referral form for " .$first_name ;
// format message body
$email_message = '<html><body>';
$email_message .= '<table border="0">';
$email_message .= "<tr ><td width='125' style='background: #eee;'><strong>Name:</strong> </td><td>" . strip_tags($_POST['patient_name']) . "</td></tr>";
$email_message .= "<tr><td><strong>Patient Phone:</strong> </td><td>" . strip_tags($_POST['patient_phone']) . "</td></tr>";
$email_message .= "<tr><td><strong>Side:</strong> </td><td>" . strip_tags($_POST['bodySideOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Area:</strong> </td><td>" . strip_tags($_POST['bodyPartOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Diagnosis:</strong> </td><td>" . strip_tags($_POST['subbodyPartOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Sub Cat:</strong> </td><td>" . strip_tags($_POST['subCatOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Injury2</strong> </td><td></td></tr>";
$email_message .= "<tr><td><strong>Side2:</strong> </td><td>" . strip_tags($_POST['I2bodySideOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Area2:</strong> </td><td>" . strip_tags($_POST['I2bodyPartOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Diagnosis2:</strong> </td><td>" . strip_tags($_POST['I2subbodyPartOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Sub Cat2:</strong> </td><td>" . strip_tags($_POST['I2subCatOutput']) . "</td></tr>";
$email_message .= "<tr><td><strong>Doctor Comment:</strong> </td><td width='125' style='background: #eee;'>" . strip_tags($_POST['doc_comment']) . "</td></tr>";
$email_message .= "</table>";
$email_message .= "</body></html>";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: '. $email_to."\r\n";
//$headers .= 'CC: '. $email_to. "\r\n";
//$headers .= 'From: '. $email_from. "\r\n";
//$headers .= 'CC: '. $email_from. ',' . $email_to."\r\n";
//send mail
mail($email_from, $email_subject, $email_message, $headers);
//mail($email_from, $email_subject, $email_message, $headers);
?>
<!-- place your own success html below -->
Email Sent
<?php
die();
?>Im currently trying to take all the validation out of the mail script and do it in the html page itself.
Bad choice. Client-side form validation isn't secure and it does not work if JavaScript is disabled. A fair number of people turn off JavaScript or use one of the No-Scripts Add-ons in their browsers for perceived security reasons.
Don't forget, spam bots don't use JavaScript either so they will penetrate your forms without missing a beat.
Server-side validation is very reliable. And if your script is built properly, it can stop robot submissions and exploitation of your forms which is very important these days.
Nancy O. -
How to open a form and close another one
hi,
I wish to open a form from another, and then close the calling form. In other words, having FORM1 and FORM2, FORM1 should do this:
OPEN_FORM ('FORM2',ACTIVATE,SESSION);
EXIT_FORM(NO_COMMIT,NO_VALIDATE);
but I cant get this to work. As FORM1 is modal, it opens FORM2 but its still open. Changing the order of the two statements only cause FORM1 to be closed. Can I perform the two operations from within FORM1, avoiding to put the EXIT_FORM statement in FORM2?
thank youHello,
Use NEW_FORM to replace the calling module.
Francois
Maybe you are looking for
-
How can I fix Firefox going black on my HP Notebook, Windows 8.1?
I have an HP Notebook 15 which uses Windows 8.1 Product name:HP 15 Notebook PC Product number:J2X46UA#ABA BIOS:F.24-09/26/2014 Keyboard revision:57.36 Total memory:4.00 GB Processor name:Intel(R) Pentium(R) CPU N3540 @ 2.16GHz Firefox will go unpredi
-
When I transfer music from my ipod to my computer not all of my music goes into my itunes library
Help, I got a new computer and when I plug in my ipod not all my music goes to my library. It shows the music on the ipod but I can't edit any playlists or view all my songs. I have 2000 songs and I can only access 29 of them.
-
No commitment line item in Purchase requestion after deletion .
Hi SAP FICO experts Please provide solution for the issue . User created a line item 20 in the purchase requestion with account assignment u2018Fu2019 (orders ) and deleted this Item 20, usually when deleted ,the line item will be there with delete
-
How to call BSP pages from a BSP application of another package
Hi, I have a BSP application in one package and I want to call pages from another BSP application in a different package. Is it possible? How it would have to do it? Thanks in advance Regards
-
I am on CS3 trying to add a Pattern Overlay. When I click on Pattern Overlay in the Layer Style Window only one pattern is shown to the right under the Preview check box. In the main box no pane appears to let me select others only General and Advanc