×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Urgent - Need formula help

Urgent - Need formula help

Urgent - Need formula help

(OP)
This is going to be a bit lengthy, but here goes. I have a an excel spreadsht that I am re-creating in Domino. It has a single field above the 'table' that asks the customer how many items they will be requesting, and the customer then specifies a number (1 thru 10).

The table has 6 columns and 10 rows. Once they have completed the form, they click on the send button and it is sent on.

Each cell must be completed in the row, and I want an input validation so they can't tab to the next cell without completing the cell they're currently in. Now, let's say they only want 1 item - then they would only be completing the first row of the table. Somehow (?) the first cell in each row needs to refer to the field/cell where they indicated how many items they are ording, Plus making sure the prior cell was completed (input validation). Once they get finished with the appropriate row they can click on the send button and away it goes. I just can't get it to work correctly. Does the last cell in each row need to reference/look at that field/cell where they indicated how many items they are ordering again and if it matches then form is finished??
 
Any help or ideas would be greatly appreciated.

RE: Urgent - Need formula help

Are you restricted to using formula language?  You could use LotusScript.  For your table, why not use the # of items input to force the table to only have that many rows?  I would have to look into a little more (I did something similar but with fields not a table - the person enters 2 then presses a button to open another form, the second form looks at what number was entered and only shows the first two "rows" of fields, if 3 then three "rows").  You can also do all the validation in LotusScript and if the validation fails return the user to THAT field.  Like I said, I would have to look at tables a bit more to see how to "hide" the rows and check the cells, but I'm sure it's possible.  Feel free to contact me!
Good Luck

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned

RE: Urgent - Need formula help

I looked into this a little bit, and I don't see how you can have users enter information into a table!  Have you been able to create a form, display it and be able to enter information into the table?  Also, is this for Web Access or Notes?  It makes a BIG difference!  Let me know if I can help.

la

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned

RE: Urgent - Need formula help

(OP)
I may have confused you. I created a form that looks like an excel spreadsheet but within a table in Notes. Also, I do not know Lotus Script, so I do need to use formula's. This will not be used on the Web.

RE: Urgent - Need formula help

So there are several different ways to do this.  

1.  In each cell of the "table" put this code in the Exiting function:

Sub Exiting(Source As Field)
  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  If uidoc.FieldContains( "FieldName", " " ) Then
    Messagebox( "You must enter a value here")
    Call uidoc.GoToField("FieldName")
  End If
End Sub

Put the name of the field where it says FieldName (but leave all the quote marks).  (the FieldContains "FieldName" can be blank.  If it is, it means the current field).

2. In the QuerySave event of the Form, check an entire row at a time.  If you'd like to do it this way, let me know and I'll help you work it out.

If I could suggest:

Instead of having a field at the top of the form, in the PostOpen event of the form put this code:

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument

Dim numreq As String
numreq = InputBox$("How many do you want?"))

Call uidoc.FieldSetText("NumberRequested", numreq)


This will present the user with an input box when the form opens asking what's in the "".  You also need to have a hidden field on your form called NumberRequested that is a text field.  In the first cell of each row, put the following in the field properties, hide when formula.

In Row 2 put:  NumberRequested < "2"
In Row 3 put:  NumberRequested < "3"

etc.  This will then only show the number of rows for the number of items they are requesting.  (You may have to put it in every field, but it should hide the paragraph - the whole line).

Feel free to email me with any questions or if you'd like more help with the LotusScript.

Good Luck.




  

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close