Hi
i have text fields like (BodNameTX, BodNameTX1,BodNameTX2 upto BodNameTX9) in one of the form how can i check where it is null or not using array
can any guy will tell me with snippet of code
DEV/"
Hi
i have text fields like (BodNameTX, BodNameTX1,BodNameTX2 upto BodNameTX9) in one of the form how can i check where it is null or not using array
can any guy will tell me with snippet of code
DEV/"
Subject: Array writing
Use this code -
var f = document.forms[0];
for (i=0;i<=9;i++)
{
if (i == 0)
{
if (f.BodNameTX.value == "")
{
alert("Enter value for BodNameTX field");
return false;
}
}
else
{
s = "f.BodNameTX" + i + ".value"
if (eval(s) == "")
{
alert("Enter value for BodNameTX" + i + " field");
return false;
}
}
}
This code only works for text fields.
–Phani
Subject: RE: Array writing
thanksphani
for your code, but i want same code in lotusscript
will u please help me in this regards
DEVs""
Subject: RE: Array writing
OK… you should have mentioned that ![]()
On button click -
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
For i = 0 To 9
If i =0 Then
If Len(Trim(uidoc.FieldGetText("BodNameTX"))) = 0 Then
Msgbox "Please enter text for BodNameTX field"
Exit Sub
End If
Else
If Len(Trim(uidoc.FieldGetText("BodNameTX" & Cstr(i)))) = 0 Then
Msgbox "Please enter text for BodNameTX" & Cstr(i) & " field"
Exit Sub
End If
End If
Next
End Sub
–Phani
Subject: Array writing
In Lotus Script you can try :
IsArray(myField)
IsNull(myField)
These both return True/False