Link to home
Start Free TrialLog in
Avatar of jforget1
jforget1

asked on

Getting data from dialog to form

I have an item I am struggling to get a solution for and need a little help. I have a database which is used to handle BlackBerry orders I need to figure out a way for an end user receiving a letter from the DB to be able to submit forms for people with their office. Basically this would be a manager who has the option to submit forms for people within his staff to be offered the option to purchase a BlackBerry. I am struggling for a way to allow them to enter just the basic information about the people on his team.

I am thinking that maybe I can do some code in a button on the email that will create a dialog box that will have the minimum fields they need to complete and then just a submit button, which will take the information gathered and drop the value down to the underlying order form. This form is saved and I could put some code to send a tracer that the item has been submitted. The trick is getting the code elements together that will allow this to be a basic 2-3 field popup to the user and then just submit and the rest happens behind the scenes.

Is this something that may be possible? I have done stuff similar, just never had it open the form, drop the data onto the form and save it without the user even knowing.
Avatar of Felix Grushevsky
Felix Grushevsky
Flag of United States of America image

yes, it is possible. the general steps would be:

1) setup your database as mail-in database. give it name something like Blackberry survey
2) design your form the way you like with whatever fields you need
3) make sure that you select "store form in document" option in the form properties
4) include field "subject" on the form. It could be hidden on the form itself, but whatever value you put or compute in the field - this is what users would see in their Inbox as incoming email subject
5) include field "Principal" on the form. It could be hidden on the form itself, but is must be present. The value of this field would be address of the mail-in database ("BlackBerry Survey")

Couple other things I usually do:
in the postopen event of the form insert this line of script:
  If Ucase$(Source.Document.SendTo(0))<>"BLACKBERRY SURVEY@YOURDOMAIN" And Source.Document.HasItem("SendTo")       Then Source.EditMode = True

This would open form in edit mode for the user, ready to be filled in.
Then I use LS action menu agent to mail the form:

Sub Initialize
      Dim session As New NotesSession
      Dim workspace As New NotesUIWorkspace
      Dim DB As NotesDatabase      
      Dim doc As NotesDocument
      Set db = session.currentdatabase
      Set doc = DB.CreateDocument
      doc.Form="BlackBerrySurvey"
      doc.subject="BlackBerry Survey"
      Call doc.ComputeWithForm(True,False)
      Slist = workspace.PickListStrings( PICKLIST_NAMES , True)
      If Isnull(Slist) Then Exit Sub
      Call doc.Send(True, Slist)
      doc.SaveOptions="0"
      
      
End Sub
Avatar of jforget1
jforget1

ASKER

Problem here is this is not a mail in database, would it be possible to bring the user into an entry form and have a button there that prompts them for the user detail for their staff?
Perhaps I misunderstood you, but you mentioned "code in a button on the email", so I suggested mail-in database. (btw, you can make any database a mail-in database, just define it in the NAB, it does not have to have mail box design etc)

Let me see if I understand your requirements. You need a button that you can email to a user. When user clicks on it it should bring up some sort of dialog box that the user will fill in. When form is completed, user clicks on submit button and data is stored in the order database.  Does it sound close to what you need?
yes this is what I am looking for. The email is a tracer that is sent to them as an eligible office that they can offer the opportunity to order BlackBerries for their staff. Once they were to enter each item we will review them then send out an invite to each user. Just looking for a way to eliminate the need for them to send us a spreadsheet with all the names of their Mgt staff and then we have to enter the basics for each users order form. Let the mgr enter the info for who they want right in the DB.
ASKER CERTIFIED SOLUTION
Avatar of Felix Grushevsky
Felix Grushevsky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The one hitch here is that we wanted to keep the mgr off the form to avoid confusion that they were placing the order for the users in their office. Was hoping that having just the basic info on the popup could be transferred down to the actual order form, save it and the user is really none the wiser that they just completed the basic user info for the person within their office. Essentially a real short entry form with a basic submit button.
OK what about another option here, is there a way to have the Mgr go to a separate form which would have a table structure with a number of rows to enter all the various people they want to enter. Then I would click some button that will take the values for the names and another piece of info or 2 and pulls this into a series of new records. Is there a way to do something with an array then put the values into new records programatically.
You can create big "order" form and small "short order" form with only few fields within the table. Send button that only opens "short form" with basic submit for approval button or something
with the short form - yes, you can make it a with table number of rows to enter all the various people they want to enter etc. In the query-save event of the form you can put code that would go through the table and create new records based on the entere values.
Probably the easiest way

I think we may be on track, basically take values from a "short form" and on save each row of data is transferred into a "long form" for further processing. We are looking to make the entry as simple and quick for the manager as they LOVE to complain. How do I make the transfer on the query save happen? Never done this type of hand off before.
Ended up going a different route here, this method is not needed, appreciate all the help.