Defining form recipients by CFSWITCH?
I am working with a form that has several check boxes on it. All of the check boxes have the same name so when the form processes I get a response like, check1,check2,check3 etc...
I want to set this up so that depending on what box(es) are checked different e-mail addresses will receive the form data.
I had tried using CFIF statements like with each checkbox individually named.
<cfif #FORM.check01# is "one">
<cfset emailRecip01="[email protected]">
</cfif>
<cfif #FORM.check02# is "two">
<cfset emailRecip02="[email protected]">
</cfif>
<cfif #FORM.check03# is "three">
<cfset emailRecip03="[email protected]">
</cfif>
<cfmail to="#emailRecip01# #emailRecip02# #emailRecip03#"
subject="Form Response"
from="[email protected]"
type="html">
This works fine if there is one address per checkbox, but I have two addresses and 11 check boxes.
Because of this I tried to use a CFSWITCH command and setup the following commands (shortened for this post).
<cfswitch expression="#FORM.checkBox#">
<cfcase value="one;two" delimiterters=";">
<cfset eAddress1="[email protected]">
</cfcase>
<cfcase value="three" delimiters=";">
<cfset eAddress2="[email protected]">
</cfcase>
<cfdefaultcase>
<cfset eAddress1="[email protected]">
<cfset eAddress2="">
</cfdefaultcase>
</cfswitch>
<cfmail to="#eAddress1# #eAddress2#"
subject="Form Response"
from="[email protected]"
type="html">
I am only receiving e-mails at the <cfdefaultcase> address. Why is this not working?
Thanks,
Jeremiah
Hi, I actually was able to find a solution based on both your suggestions. Instead of using listfind, I used list length and separated the check boxes into two groups, checkbox1 and checkbox2. Then I used CFSET to check the length of the string returned, delimited by commas. From this I was able to write conditional statements, code below.
<cfset listLength01 = ListLen("#FORM.checkBox1#", ",")>
<cfset listLength02 = ListLen("#FORM.checkBOx2#", ",")>
<cfif #listLength01# GREATER THAN "0">
<cfset emailRecip01="[email protected]">
</cfif>
<cfif #listLength02# GREATER THAN "0">
<cfset emailRecip02="[email protected]">
</cfif>
<cfif #listLength01# is "0" and #listLength02 is "0">
<cfset emailRecip01="[email protected]">
</cfif>
<cfmail to="#emailRecip01#,#emailRecip02#"
subject="Form response"
from="[email protected]"
type="html">
Thanks to both of you both of your help!
Jeremiah
Similar Messages
-
Opening a Crystal Report in B1 8.8 in a User Defined Form representing UDO
Hi Experts,
Is it possible to open a Crystal Report from a User Defined Form representing my UDO?
I had developed a 'Vendor Quotation' UDO and its User Defined Form
I wanted to show the report while clicking the Preview menu in SAP B1 8.8 toolbar.
I have created the Crystal report and used the record selection as {@OVQT.DocEntry} = {DocKey@}
Please help
Also, is it possible to add Print layout and assign a default Print layout to this User Defined Form?
Thanks in advance
Regards
ArunHi,
I also face the same problem. I make a master type using UDO. But i want to print it.
In my opinion ( i haven't tried this way ). If we make a UDO ( master or document type ) , we will find the docentry and object field in our UDT. Both of these will connect between SAP form and Crystal report. In crystal report we select the tmsp_doclinetypelayout. It is a store procedure which will connect between SAP form and CR. Before that try to modify this SP by adding the udo object.
Fyi, if i'm not mistake dockey is connected to docentry SAP form.
Thanks
regards
bodhi86 -
User Defined Form problem...
Hi,
I have the Item Master Data form opened with the User Defined Form opened.
Now the Form has the focus and I'm trying to get an User Defined Item control on the User Defined Form
but it says Form not found and I did try to select it or to use the GetForm with the "-" + TypeEx of the current form but nothing seems to work.
Any idea how I can switch from the form to the User Defined Form on which I need to get the control ?
I havfe to mention that I'm trying it on a second opened Item Master Data form so the FormTypeCount = 2 Could it be a BUG ?
Edited by: Marc Roussel on May 28, 2009 4:20 PMif (mo.ItemUID.IndexOf("U_") != -1)
oCurrentForm.PaneLevel = 1; // I tought this could help since the UDF form has a pane level of 1 but it does nothing.
oCurrentForm = _SBOApplication.Forms.GetForm("-" + FormType.ToString(), FormTypeCount);
// I get a Form not found here............ HUH WHY ??????? It's there and visible. I DON'T UNDERSTAND...
// and FormType is really "150" which is the actual form opened...... -
Give authorisation To User defined form
How to give authorisation to User defined form
Regards,
Pravinhi,
After you have created the additional Authorization in Additional Authorization Creator window you still need to define the authorization in the Authorization Window located at Administration -->> System Initialization -->> Authorizations -->> General Authorizations. then select your desired user and assign your desired Authorization.
regards,
Fidel -
Type property for user defined forms
Hi,
When creating a user defined form using Screen Painter,
how can we assign Type property for the form so that we are sure it will not clash with system forms in the future?
Thanks,
Satish.Thanks Juli
Just one last question. It it be alright to assign a text value(Partner namespace in front) for the form type property.Does it have any drawbacks?
Thanks,
Satish -
Problem - Define Forms for Check Deposit List - Need Help
Hello Experts,
I want to extend the logic of T Code FP20 (Prog RFKKCK01),
Hence, I have created a 'Z' prog with the appropriate extension in the logic.
Now to take these change effectively, i have made corrensponding changes in the attached SAP Script (FKK_CHECKDEPOS) also.
Now, when I go to
Contract Accounts Receivable and Payable -> Business Transactions -> Payments -> Processing Incoming and Outgoing Payments ->Define Forms for Check Deposit List.
In this, I create a new Entry after removing the existing Entry of the same Company Code [1000 | ZRFKKCK01 | SapScript | ZFKK_CHECKDEPOS ]
it gives me an Error "Specify the key within the work area".
Specify the key within the work area
Message no. SV033
Diagnosis
You have attempted to create an entry whose key is not in the range defined for this area.
System Response
The entry cannot be created.
Procedure
Please check your entry.
Please Help me solving this problem.
Thanks!!Thanks sbaranga. This code won't work for me.
<select>
<option value="P"if (statusIndicator.equals("Pending")){ selected}>
<option value="A"if (statusIndicator.equals("Approved")){ selected}>
</select>
In above code statusIndicator is ID I believe. I need to show selected item based on statusIndicator in database. Also it has to pass updated status to database incase if user changes status thru form.
If they select Pending then "P" will be passed to servlet and if they select Approved then it will pass "A" to servlet.
I will be receiving "A" or "P" from database when I am trying to retrive status value from database. Based on value "A" or "P" I need to change selected information on form.
Update and Retive form are same. this one form does everything display and update.
I hope this help to understand my question.
If you have any question then email me at [email protected]
Thank you. -
Hi all sap gurus,
In IMG-lg-tax on godsmvmt-india-master data-define form types if we create form types where it will use and what is the effects.
regards,
sreenivasThanks for quick replay to all,
1 If we r maintaing in the IMG its not reflecting in J1IUN then why should we maintain in IMG.
2 if we r not maintaing in IMG we can able to create in J1IUN directly. then what is the use in img. how we can track the report
plz can some one ecplain
regards
sreenivas -
KE31 - Copying a report with newly defined form
Hi ,
While creating a new profitability report(Report A) by copying an existing report (Report B with Form B) with the newly defined FORM(Form A) , the system is creating the new report(Report A) with the form (Form B) from the copied report.
How to create the report by copying another report (to get Report A with Form A)?
Thanks,
PrabhaHi ,
Thanks for your reply.
I created form A and used KE31 for creating report A by copying report B.
While doing so, the report A got the form B not the form A. Though I assigned the form A while creating the report A (with copying report B), the report A got Form B.
How to create the report A with form A by copying report B?
Thanks,
Prabha -
Regarding query generation to user defined forms
Hi all,
i had created user defined form with some fields and tables
tables in the sense matrix
i had entered the data in that table
and added that data
after that i came back to that form and used the fields that are below the table to calucalate the maximum and minimum from the columns of matrix
so to get the data of that particular form only i used the $ command to extract data depending on the report number
but iam unable to get the result
any one help me regarding this
it is required urgent
Thanks And Regards
sravanth.smSravanth,
Let's see if I can help you.
Assume your form's title table is called @TITLE and the matrix table is called @ROWS. In the form's title you have the record key DocEntry. In the Matrix you have a column COLUMN from were you are going to get some value. ok?
Maximum of the column
SELECT Max(T0.COLUMN) FROM [dbo].[@ROWS] T0 WHERE T0.DocEntry=$[@TITLE.DocEntry]
To get the minimum, just use the Min() function.
Regards,
Vítor Vieira -
Base Document and Target Document Menu for User Defined Forms
Hi Experts,
I am facing a problem regarding enabling the menu "Base Document" Menu UID="5898" and "Target Document" Menu UID="5899" . Both of these menu Items are not enabled for User Defined Form .Actually I have developed a user Defined form for Purchase Requisition that targets Purchase Order . User can Copy Line Items From Purchase Requisition to Purchase Order and I am tracking the DocEntry and LineId of PR into PO Item's using UDS . I want to Open this PR Document upon Click of BaseDocument Menu .I have tried all the options. I have used Form.enableMenu() method also . But none of those options work for this menu . I ahve also searched about this problem i this forum also but there is no soultion so far posted regarding this.
I really want to confirm whether it is possible or not using SDK for User Defined Forms . Is there any possiblity of implementing any WorkArounds and Having this feature implemented .
I am Expecting a true solutions as this Forum has so many Experienced Experts .
Thanks and Regards,
Pooja Singh.Hello Poja,
It is not possible, because the requested menus are depending on the forms, and the are not exists,
WorkAround:
add the menus to the User Defined forms, and use right click to activate them:
oForm.Menu.Add("5898", "Base Document", BoMenuType.mt_STRING, oForm.Menu.Count)
oForm.EnableMenu("5898", True)
And hanle the menu event when you clicked them and the form is your custom form.
Regards,
János -
SQL Query for user defined form
Hi experts,
I want query to update some fields in my user defined form using stored procedure on clicking of ADD button.
Explanation:
I have User Defined form call "DC request" with Object 'DCLM'..On click of Add button, it is saving my record info into the form. But in one field if value in not entered then it is saving as 'Null'.
Addon is already made, can not change in coding.
I want to update this field with '0' value through query in stored procedure on click of Add Button. Can anyone help me out to achieve this.
ThanksHi Team Bone.
Please try below Transaction Notification which will Restrict User to ADD if Field_Name is NULL and then User Need to Enter ZERO i.e. 0 for Adding.
IF @OBJECT_TYPE = 'DCLM' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
BEGIN
If Exists (Select T0.DocEntry from [Table_Name] T0 Where ( T0.Field_Name is null OR T0.Field_Name = ' ' ) AND T0.DocEntry = @lisT_of_cols_val_Tab_del )
begin
SET @error = -100000
SET @error_message = 'Filed_Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
End
End
Please change Table_Name and Field_Name with with UDO field.
Hope this help
Regards::::
Atul Chakraborty -
How do i hide former recipients when i forward an email
if my friend emails me a message that has prior recipients how to i hide those names and addresses if i want to forward his message to someone else?
I just hit "forward", then once in the message box, I delete all the previous messages, which included the former recipients. I just send the new current message to the one person I want to see it. Just make sure you don't hit "reply to all". . Good luck.
-
Include the COPY TO Option in User Define form
Hi Experts
How can we include the COPY TO Option in User Define form
Thanks In Advance
A S VAMSI KRISHNAHi,
In SAP B1 i think there is no default functionality for copy to in user defined form. As Parminder said you can use the control button combo and write your own method for populating data.
Regards
Arun -
Problem When Try to add Master data record for User define form
Hi,
I have made one user define form. And assign UDO and fields proerly in form.
But when I try to add the record from the form it will give me error
Invalid Code [Operation Master -Code] [Message 173-36]
I have already bind the code field of the table to one field in the screen painter.
Please give me the reply.
Regards,
Gunjan Shukla.Dear Shukla
Can you please try to do the binding in the code (after loading the from).
Doing that, do you still have the problem?
Best regards,
Miki -
Hi all,
I have been defining Form Variables in the following manner :
*<Field name='global.firstname'>*
I always use the prefix "global".
Next, I edit the "IDM schema" file, making sure to add the new field/attribute, as follows :
*<IDMAttributeConfiguration name='firstname'*
description='default attribute from UserExtendedAttributes/UserUIConfig'
syntax='STRING'/>
The reason I did this is because : I noticed that, if I do not specify the attribute itself in the "Schema" file, then the values will not be SAVED when I input them in the User Form.
However, I was informed that IDM does not require that Form Variables be specified in the Schema file. In fact, Form Variables do not require the *"global"* prefix to be used.
But, if that's true, then why are my field values not being STORED?
Any tips will be greatly appreciated.
ThanksThis subject is covered in the very beginning of the training courses and in the documentation.
Adding an attribute to the schema means that it can be stored in the IdM Repository, nothing else.
Using the "global" prefix means that the attribute value will be stored in ALL resources that has an attribute with the same name.
If You want to store the user just in the IdM repository, you can use the prefix "accounts[Lighthouse]" instead which also prevents the value being stored at other resources as well. "Lighthouse" being the IdM default resource name.
While on it, You should look up what the prefix "waveset" means too!
Maybe you are looking for
-
how much is to change the ipod touch 5 screen at a London authorized apple store or technical support?, how much is to change the ipod touch 5 screen at a London authorized apple store or technical support?
-
How to get a photo into mySql with java
I wonder how I can get a photo from a client-macine through web, into a mySql database. Communications too the web-user is going through a Servlet who is runnin in a Server, where the mySql database are too. I haved tryed this code-sequense but it do
-
Using jquery to fade in validation messages in and out
Hello, I am using spry validation on my form and I have it where it pops up a graphic when the validation happens. Now to dress it up better I would like those graphics to fade in and out depending if they meet the validaton or not instead of just di
-
Using macbook with xbox 360.
I was wondering if I could hook up my xbox 360 to play through my future macbook. How well would that run? Or should I just not even try to attempt that?
-
I'm trying to "un"disable an iPhone 4s. Any way to do this without having to reset the phone?