Showing posts with label Notes Web. Show all posts
Showing posts with label Notes Web. Show all posts

Notes document to HTML Excel sheet - Exporting data - web form

Code for exporting data from notes documents to an excel sheet and show it in html form of excel sheet:

Sub Initialize
 On Error Goto GenErr
 Print  "content-type: Application/msexcel"
 Print  "Content-Disposition: attachment; filename=Report1.xls"
 Print "<html>"
 Print "<table border=0>"
 Print "<tr><td colspan=5><center>"
 Print "<b><span id='RptHead'> Report For Test</span></b>"
 Print "</center></td></tr>"
 Print "</table>"


 Dim LOSession As New NotesSession
 Dim LOVw As NotesView
 Dim LODb As NotesDatabase
 Dim LODoc As notesdocument
 Dim LTDate As String
 Dim LVNo As Variant
 Set LODoc = LOSession.DocumentContext
 'LTDate=LODoc.Query(0)

 Set LODb=LOSession.CurrentDatabase
 Set LOVw = LODb.GetView( "vwExcel" )
 Set LODoc = LOVw.GetFirstDocument

 Print "<table border=2 bordercolor=Black>"
 Print "<tr>"
 Print "<td>Sl No </td>"
 Print "<td> Initiators</td>"
 Print "<td>KLID </td>"
 Print "<td>SBU </td>"

 Print "<td>Project Short Name </td>"
 Print "<td>Product Group </td>"
 Print "<td>Product </td>"
 Print "<td>Function </td>"
 Print "<td>LOB </td>"
 Print "<td>Rating by Experts </td>"
 Print "<td>Project Manager </td>"
 Print "<td>Proposal Manager </td>"

 Print "<td>Process Area </td>"
 Print "<td>Process Item </td>"
 Print "<td>Key Learning Title</td>"
 Print "<td>Problem Description </td>"
 Print "<td>Analysis </td>"
 Print "<td>Solution Adopted </td>"
 Print "<td>Learnings </td>"
 Print "<td>Implication </td>"
 Print "<td>DO's  List</td>"
 Print "<td>DONOT's List </td>"
 Print "<td>References </td>"

 Print "<td>Approver </td>"
 Print "<td>Comments </td>"

 Print "</tr>"
 Print "<tr>"
 Print "</tr>"

 j=1
 While Not ( LODoc Is Nothing )
 
  Print "<tr>"
  Dim LVTemp As Variant
  Print "<td>" & j &"</td>"
  For  i=0 To 23
   'LVTemp =  LODoc.ColumnValues( i )
   'Msgbox LVTemp
   'Print "<td>" & LVTemp & "</td>"
  
   Print "<td>" & LODoc.ColumnValues( i ) & "</td>"
  
  
  Next
  Print "</tr>"
  j=j+1
 
  Set  LODoc = LOVw.GetNextDocument(  LODoc )
 Wend

 Print "</table>"
 Exit Sub
GenErr:
 Msgbox "Error on SaveKtips agent , Error On line " & Erl & " Error is " & Error & " Err is " & Err
 Exit Sub

End Sub

Function to catch Enter key press

Function to Catch Enter Key press and accordingly perform the required task:

function catchEnter(){
        if(window.event.keyCode == 13){
                document.all.S.click();
        }
}

Validation date and number through regular expression

Validation of number through regular expression:

function validateNumber( f ) {
        var regex = new RegExp();
        //regex = /^\d+$/;
        regex = /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/
        if ( regex.test( f.value ) ) {
                return;
        } else {
                alert("Please enter a number value");
                f.value = "";
                f.focus();
                return;
        }
}


Validation of date through regular expression:

function CheckDate(dateV)
{
        var dateStr = dateV.value;
        if(dateStr==""){
                return;
        }
        if(dateStr=="tbd" || dateStr=="TBD"){
                return;
        }
        isValidDate(dateV, dateStr);
}


function isValidDate(dateV, dateStr)
{
        var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;
        var matchArray = dateStr.match(datePat);  
        if (matchArray == null) {
                alert("Date is not in a valid format.")
                dateV.focus();
                return;
        }
        month = matchArray[1]; // parse date into variables
        day = matchArray[3];
        year = matchArray[4];
        if (month < 1 || month > 12) {  
                alert("Month must be between 1 and 12.");
                dateV.focus();
                return;
        }
        if (day < 1 || day > 31) {
                        alert("Day must be between 1 and 31.");
                        dateV.focus();
                return;
        }
        if ((month==4 || month==6 || month==9 || month==11) && day==31) {
                alert("Month "+month+" doesn't have 31 days!");
                dateV.focus();
                return;
        }
        if (month == 2) {
                var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
                if (day>29 || (day==29 && !isleap)) {
                        alert("February " + year + " doesn't have " + day + " days!");
                        dateV.focus();
                        return false;
                }
        }
        return;
}

Extracting attachments from web application

Here's a code for extracting attachments/files from documents in LN web application:

Sub Initialize
        On Error Goto errhandle
        Dim session As New NotesSession
        Dim db As notesdatabase
        Dim view As NotesView
        Dim doc As NotesDocument
       
        Dim object As NotesEmbeddedObject
       
        Dim collection As NotesDocumentCollection
        Dim currentResponse As NotesDocument
       
        Dim tempDirectory, actualDir As String
        Dim nameAtt, result As Variant
        Dim numAtt, count As Integer
       
        tempDirectory="P:\\Gayatri\\Temp\\"
'       tempDirectory="O:\\CITC\\ECAS\\GRCE\\"
        Set db = session.CurrentDatabase
        Set view = db.GetView("KBByCategory1")
       
        numAtt = 0
        count=0
        cnt = 0
       
        Dim myNames() As String
       
        Set doc = view.GetFirstDocument
       
        While Not (doc Is Nothing)
               
                result = Evaluate("@Attachments", doc)
                nameAtt = Evaluate("@AttachmentNames", doc)
                numAtt = result(0)
               
                If numAtt > 0 Then
                        For i=0 To numAtt-1 Step 1
                                If nameAtt(0) <> "" Then
                                        Set object = doc.GetAttachment( nameAtt( i ) )
                                        indx = 0
                                        flag = "no"
                                        For k = 1 To cnt Step 1
                                                If nameAtt( i ) = myNames( k ) Then
                                                        indx = indx + 1
                                                        flag = "yes"
                                                End If
                                        Next
                                        If flag = "yes" Then
                                                filename = Left$(nameAtt( i ),Len(nameAtt( i ))-4) + "_" + indx +       Right$(nameAtt( i ), 4)                                                                                                                                        
                                        Else
                                                filename = nameAtt( i )
                                        End If
                                       
                                        actualDir = tempDirectory & filename
                                        Call object.ExtractFile(actualDir)
                                        count = count + 1
                                       
                                End If
                        Next
                End If
               
                If numAtt > 0 Then             
                        Redim Preserve myNames(cnt+numAtt)
                        For j = 1 To numAtt
                                myNames(cnt + j) = nameAtt( j - 1  )
                        Next
                        cnt = cnt + numAtt
                End If
               
                '------------------------------- Response ------------------
                Set collection = doc.Responses
                Set currentResponse = collection.GetFirstDocument
               
                While Not ( currentResponse Is Nothing )
                       
                        result = Evaluate("@Attachments", currentResponse)
                        nameAtt = Evaluate("@AttachmentNames", currentResponse)
                        numAtt = result(0)
                       
                        If numAtt > 0 Then
                                For i=0 To numAtt-1 Step 1
                                        If nameAtt(0) <> "" Then
                                               
                                                Set object = currentResponse.GetAttachment( nameAtt( i ) )
                                                indx = 0
                                                flag = "no"
                                                For k = 1 To cnt Step 1
                                                        If nameAtt( i ) = myNames( k ) Then
                                                                indx = indx + 1
                                                                flag = "yes"
                                                        End If
                                                Next
                                                If flag = "yes" Then
                                                        filename = Left$(nameAtt( i ),Len(nameAtt( i ))-4) + "_" + indx +       Right$(nameAtt( i ), 4)                                                                                                                                        
                                                Else
                                                        filename = nameAtt( i )
                                                End If
                                               
                                                actualDir = tempDirectory & "Responses\\" & filename
                                                Call object.ExtractFile(actualDir)
                                                count = count + 1                              
                                        End If
                                Next
                        End If
                       
                        If numAtt > 0 Then
                                Redim Preserve myNames(cnt+numAtt)
                                For j = 1 To numAtt
                                        myNames(cnt + j) = nameAtt( j - 1  )
                                Next
                                cnt = cnt + numAtt
                        End If
                       
                        Set currentResponse = collection.GetNextDocument( currentResponse )
                       
                Wend
               
                Set doc = view.GetNextDocument (doc)
               
        Wend
        Msgbox cnt
        For i = 1 To 21 Step 1
                Msgbox myNames(i)
        Next
        Msgbox count
        Exit Sub
errhandle:
        Messagebox " Error line: " & Erl() & " error : " & Err() & " err() : " & Err()
End Sub

Refresh a form keeping its field values


To refresh a form keeping its field values as is:

http://authorsloft.com/SupportRef.nsf/e6b464faa52c14d1852567d90082c48f/1c05fb75304ce7a685256b710005fb38!OpenDocument

Copied the content from the above link:
Domino form / document refresh using JavaScript:

Better Option (Domino6 + ):
if(ValidationFunc()==true) {
return _doClick('$Refresh', this, null);
}

A longer version to specify a frame and what field to base refresh on:
return _doClick('$Refresh', this, '_self', '#_RefreshKW_' + 'somefieldname' );

To refresh the document

To refresh the entire document in client : @Command([ViewRefreshFields)
And to refresh entire document in web : _doClick('$Refresh', this, '_self', '#_RefreshKW_')

To run an agent from lotus notes webpage

To run a Lotus-script agent from a lotus notes webpage:

1) Write @Command([ToolsRunMacro]; "(MyWebAgent)") in the button's programmer pane Client > Formula and it will work when you click the button. No need to do Pass-thru HTML for this button.

If for some reason you are still not able to achieve your result, you can use an indirect approach, i.e.

2) In your button where you have written the code for running the agent, in it's Properties > HTML tab, give a name  and id to it. It's better if we keep the value for Name and ID same.

Then create another Button or link and in that write in the programmer pane Web > Javascript, document.forms(0).<the button's ID value>.click()

i.e. document.forms(0).btnCheckDuplicate.click()

Thus, the first button will be triggered with the click() event and your agent will run.

Proper way to logout a website...

Proper way to logout is a website in lotus notes:

After you use the default logout code you must redirect the page to another page.
This way if a PC is being used by multiple users it will not open the same session.
Once you redirect to another page, it kills the session completely post logout.

Syntax:
top.location = self.location.href.substring(0,self.location.href.indexOf('.nsf') +4) + "/<framesetname>?logout&redirectTo=http://"+window.document.forms[0].Server_Name.value+"/"+window.document.forms[0].DBNameTX.value+"/";

This is a response that I posted in IBM developers forum.
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/7ba21b9304eaa6d6852570e500215ebf?OpenDocument

$$Fields and Reserved Notes Field Names Glossary



I got this content long back from some website.. can't remember.
I found it very useful. So, here it is for your use..


$$Fields and Reserved Notes Field Names Glossary
Anonymous on 08/26/1999 at 07:51 PM

Category: Notes Developer Tips
Forms/Subforms, Formulas
$$ Fields

$$HTMLhead
If you don't use the "For Web Access: Treat document contents as HTML" form property, adding a $$HTMLHead field to a form allows you to pass HTML information, such as Meta tags and JavaScript, to the Head tag for a document. The field can be any data type, but a hidden computed-for-display text field is the best choice.
(source: Notes Help 4.6)

$$QueryOpenAgent (4.6) or the form event WebQueryOpen (4.6)
The Notes Help 4.6 says about WebQueryOpen: A WebQueryOpen event runs the agent before Domino converts a document to HTML and sends it to the browser. Domino ignores any output produced by the agent in this context.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQueryOpen form events.
This simulates the LotusScript QueryOpen form event that isn't supported on the Web.
The $$QueryOpenAgent field works in the same way. Works also in 4.6.


$$QuerySaveAgent (4.5) or the form event WebQuerySave (4.6)
The Notes Help 4.6 says about WebQuerySave: A WebQuerySave event runs the agent before the document is actually saved to disk. The agent can modify the document or use the document data to perform other operations.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQuerySave form events.
This simulates the LotusScript QuerySave form event that isn't supported on the Web.
The $$QuerySaveAgent field works in the same way. Works also in 4.6.


$$Return
After Web users submit a document, Domino responds with the default confirmation "Form processed." To override the default response, add a computed text field to the form, name it $$Return, and use HTML as the computed value to create a customized confirmation.
(source: Notes Help 4.6)


$$ViewBody
Value is view name (in quotes) or a formula that computes the view name. Same as Embedded View.
(source: Notes Help 4.6)
This is the field you put in a form to display a view. See also the list of $$ forms below.


$$ViewList
Has no value. Same as Embedded Folder Pane.
(source: Notes Help 4.6)
This is the field you put in a form to display the list of available views and folders. See also the list of $$ forms below.


$$NavigatorBody, $$NavigatorBody_n
Value is navigator name (in quotes) or a formula that computes the navigator name.
Same as Embedded Navigator. To create multiple $$NavigatorBody fields on a form, append an underscore and a character to each subsequent field name.
(source: Notes Help 4.6)
This is the field you put in a form to display a navigator. See also the list of $$ forms below.




The following fields are not $$ fields, but they are reserved names in a Web context.


Table of CGI variables from the Notes Help 4.6


Domino captures the following CGI variables through a field or a LotusScript agent. You can also capture any CGI variable preceded by HTTP or HTTPS. For example, cookies are sent to the server by the browser as HTTP_Cookie.


Auth_Type
If the server supports user authentication and the script is protected, this is the protocol-specific authentication method used to validate the user.

Content_Length
The length of the content, as given by the client.

Content_Type
For queries that have attached information, such as HTTP POST and PUT, this is the content type of the data.

Gateway_Interface
The version of the CGI spec with which the server complies.

HTTP_Accept
The MIME types that the client accepts, as specified by HTTP headers.

HTTP_Referer
The URL of the page the user used to get here.

HTTPS
Indicates if SSL mode is enabled for the server.

HTTP_User_Agent
The browser that the client is using to send the request.

Path_Info
The extra path information (from the server's root HMTL directory), as given by the client. In other words, scripts can be accessed by their virtual path name, followed by extra information that is sent as PATH_INFO.

Path_Translated
The server provides a translated version of PATH_INFO, which takes the path and does any virtual-to-physical mapping to it.

Query_String
The information that follows the ? in the URL that referenced this script.

Remote_Addr
The IP address of the remote host making the request.

Remote_Host
The name of the host making the request.

Remote_Ident
This variable will be set to the remote user name retrieved from the server. Use this variable only for logging.

Remote_User
Authentication method that returns the authenticated user name.

Request_Method
The method used to make the request. For HTTP, this is "GET," "HEAD," "POST," and so on.

Script_Name
A virtual path to the script being executed, used for self-referencing URLs.

Server_Name
The server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.

Server_Protocol
The name and revision of the information protocol accompanying this request.

Server_Port
The port to which the request was sent.

Server_Software
The name and version of the information server software running the CGI program.

Server_URL_Gateway_Interface
The version of the CGI spec with which the server complies.


Associated with a lot of the $$ fields are the following forms:

$$ViewTemplate for viewname
Requires a embedded view or $$ViewBody field
Associates the form with a specific view. The form name includes viewname, which is the alias for the view or when no alias exists, the name of the view. For example, the form named "$$ViewTemplate for By Author" associates the form with the By Author view.
Domino requires an Embedded View or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplate for navigatorname
Requires a embedded navigator or $$NavigatorBody field.
Associates the form with a specific navigator. The form name includes navigatorname, which is the navigator name. For example, the form named "$$NavigatorTemplate for World Map" associates the form with the World Map navigator.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value. Domino ignores create and read access lists on the form.
(source: Notes Help 4.6)

$$ViewTemplateDefault
Requires a embedded view or $$ViewBody field.
Makes this form the template for all Web views that aren't associated with another form.
Domino requires an embedded view or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplateDefault
Requires a embedded navigator or $$NavigatorBody field.
Makes this form the template for all Web navigators that aren't associated with another form.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$SearchTemplate for viewname
Associates the form with a specific view. Domino requires the $$ViewBody field, but ignores the value. The form name includes viewname, which is the alias for the view, or, when no alias exists, the name of the view. For example, the form named "$$SearchTemplate for All Documents" associates the form with the All Documents view.
(source: Notes Help 4.6)

$$SearchTemplateDefault
Domino requires the $$ViewBody field, but ignores the value. This form is the default for all Web searches that aren't associated with a specific form.
(source: Notes Help 4.6)

$$SearchSiteTemplate
In a site search this form is used in stead of $$SearchTemplateDefault
(source: posting by Andrew S Grant on Notes.Net)

$$Search
When a user initiates a text search from the Web, Domino looks in the current database or in the search site database in a multiple-database search for a form with the actual name or the alias name $$Search. If the form exists, Domino opens it; otherwise, Domino displays the default search.htm file stored in the domino\icons directory.
(source: Notes Help 4.6)


And another set of very useful forms (i didn't even know they exsisted until a few moments
before):

$$ReturnDocumentDeleted
Displays to Web users when the user successfully deletes documents. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthenticationFailure
Displays to Web users when the user's name and password can't be verified. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthorizationFailure
Displays to Web users when the user doesn't have a high enough access level to access the database.
Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnGeneralError
Displays to Web users when any other errors occur.. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6) 

Hiding a Rich-Text field in Lotus Notes

Hiding a rich-text field. This is what my sis has been trying to achieve from past 2 hours now. Ah... it feels so irritating when you try to use all sorts of hide-when condition and it doesn't work. We tried normal field properties hide-when condition, tried sections, tried computed/computed for display etc. It did not hide.

Then I tried to google about it. It showed me several links with all stories in it. In the summary of a link I saw the name "subform". Eureka!!! I found it.



Then she created two subforms, ReadBody and EditBody and used the following formula in my main form.
@If(@IsMember("[< Role >]";@UserRoles);"< ReadOnlySubform >";"< EditOnlySubform >")

In the EditBody subform she created a RichText field with name as Body and Type as Editable, with default value as Body.


In the ReadBody subform she created a RichText field with name as dispBody and Type as Computed, with default value as Body.


In the main form, she added the subform as Computed one; set the formula as:
@If(@IsMember("[Roster Admin]";@UserRoles); "ReadBody"; "EditBody")


Thus, for the people with a specific role, the RichText field is editable and for other it's a read-only field.

It's now so easy to hide RichText fields or just making them Read-Only.

Hope you find this solution valuable.

Authors vs Readers

Readers and Authors fields - a common interview question. I remember whatever interviews I have given in any organisation or who ever I have interviewed I have always asked them questions related to Readers and Authors field with lot of permutation and combination. Today I thought of documenting whatever I know about these fields, so I can refer to it whenevevr I want and brush up my brain a little if I have forget anything in future. 

Basics about Authors and Readers field
Authors
Authors field works in conjuction with Author access i.e. it controls only people with Author access in the ACL.

If you have only Author access you can Read, but you cannot Edit that document.

However, if you have Author access and your name is listed in the Authors field of that document, then you can edit that document.

Authors field affects only users who have Author access in the ACL. If you have Read access in ACL and your name is in Authors field, then you cannot edit the documents. Thus, Authors field cannot override the ACL.

Editor access or higher access in ACL are not affected by the Authors field.


Readers
Readers field controls who can read the documents. Readers field doesn't give you more access than what you are given in the ACL. 

If you have No Access and are listed in the Readers field then you cannot read the document.

However, if you have Editor or higher access and your name is not listed in the Readers field then even if you have Editor or higher access you are not be allowed to read the documents.

If you have Editor or higher access and you want to read the documents with Readers field in it then have your name listed in the Form Properties > Security Tab > Default read access for documents created with this form >
a. have your name added to the ACL and tick the All readers and above checkbox.
b. have your name added to the ACL and tick the names who should read documents cerated with that form.
c. have your name added to the Readers field in the form design.

It doesn't affect the read access list or the ACL. Readers field can control/restrict the access of the document before it is created. Readers field also affects the Replication of the documents.



Authors & Readers
Authors field doesn't affect Edit Access or higher. Readers field does affect Edit Access or higher.

Authors field overrides the Readers field. i.e. if your name is not there in the Readers field, but is there in the Authors field of that same document, then you will be able to read the document.

A Readers field with a blank value mean that everyone can Read the document.

However, an Authors field with a blank value doesn't allow anyone to Edit the document.

"*" value in the Readers / Authors field enables everyone to Read / Edit, respectively, the documents.

If you go to the Document properties and check the Fields Tab, you can see the Field Flags.
The Readers field shows field flags as: READ-ACCESS NAMES
The Authors field shows field flags as: READ/WRITE-ACCESS NAMES


Things need to be taken care of while creating Readers/Author field
The right way of adding values to the Readers / Authors fields are:
a. Use canonical form of the name, i.e. CN=Gayatri Gouda/OU=IND/O=CS.
b. Use roles with the square brackets, i.e. [HelpdeskAnalyst].
c. Do not use the Domain name with the canonical name i.e. no @DOMINO.
d. Avoid any extra spaces before or after or in between the names in quotes. Use @Trim.
The field type of these fields should be Editable / Computed / Computed when composed.
e. Do not make these fields as Computed for Display. Otherwise the notes document would fail to calculate your access.
f. If you want multiple users to edit or read the documents, in the field properties, you must tick the Allow multiple values in the field properties. This stores the names and the roles as a Text-list and in the form of:
"CN=Gayatri Gouda/OU=IND/O=CS":"CN=Suchi Gouda/OU=IND/O=CS":"[HelpdeskAnalyst]"
g. Use colon (:) to separate values and not semicolon (;) or any other character.
h. Enclose the values in parenthesis ("").

Gradient effect in Lotus Notes Client and Web applications

Creating Gradient effect in Lotus Notes client is very easy. You just have to go to create a table in the form/page. Then in the Table Properties > in the Table/Cell Background tab you select Cell color. Then you select the type of style and choose the colors for the gradient. And your table cells are ready with the gradient effect.

However, this gradient effect is not visible in web. Thus, you have to find some other way to color the cells with gradient effect.

I have found one way which I have used in my earlier web-based projects. I got that from the Microsoft website. Now, of course they don't use that feature any more, I guess. However, they have left a beautiful one-liner for us.

Here's the code:

Here the startColorStr and endColorStr describe themselves what they do. You have to just choose your color code in hex decimal code.

You can check the hex codes in any tool used for photograph editing. Or you can get the code from some of the websites which generate hex code for the color you choose. One such website is: http://www.2createawebsite.com/build/hex-colors.html

Now, about the gradientType; this value can be set to "0" or "1".
1 would give you a horizontal gradient i.e. the start color would be in the left and the end color would be in the right .
0 would give you a vertical gradient i.e. the start color would be at the top and end color would be at the bottom.

You can implement this code as HTML code in your form. Or, if you have drawn a table and you want apply the gradient effect then you can use this in the table properties. All you have to do is go to the Table Properties > Table Programming tab and in the Cell HTML Tags > Style field add the following code:
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FFFFFF', endColorStr='#98B2E6', gradientType='0')

Thus, when you preview your application in web the cells would show the gradient effect.

If there are any other way of using gradient effect in forms, then please do let me know.