Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent - Need formula help

Status
Not open for further replies.

SeeBee

Technical User
Mar 18, 2002
31
0
0
US
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.
 
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
 
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
 
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.
 
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 < &quot;2&quot;
In Row 3 put: NumberRequested < &quot;3&quot;

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top