Solved

Dialog Box to enter new students to one field.

Posted on 2006-06-21
4
255 Views
Last Modified: 2013-12-18
Have a form where I need to enter the attendance for a class and some user info. I want to do this using a Dialog Box that pops up from say an Add Student button. I will have something like a field for Name, Title and ID. How do I go about setting this up so a trainer can click on the button and a new student will be appended to a common single multi value field. THe way I have it not I have to create a huge table of fields, once row for each student, trying to estimate the greatest number in a class. I know this is not the best way and have seend it done with a clean dialog box, but not sure how exactly it is done.

Any advice is appreciated.

Joe
0
Comment
Question by:jforget1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 16955423
I would create a docment for each stdent, and then have a view that can be used as a lookup.
This is simple, and will alow for added functionality in the future.
You can have a Class  ID and other identifiers so that it will be easy to do a lookup.

I hope this helps !
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 250 total points
ID: 16955627
You can do it in a DialogBox. I have a set of functions and classes that do exactly what you want, even more, because most likely you need both Add and Remove. There is a similar set in the Sandbox somewhere (less advanced of course ;). See
    http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/f2acda4419a5e3cd00256c0e00314e05?OpenDocument
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 250 total points
ID: 16956811
As sjef says, you can do it, but it's a matter of keeping a before and after field.

You have a set of fields that display the nice student information, computed for display, new line for each entry.

Name ->@Word(MyList;"|";1)          Class  ->@Word(MyList;"|";2)      ID->@Word(MyList;"|";3)
Bob                                               Class1                                         BBB
Mary                                             Class2                                         CCC

You have the field (myList) that holds the list:  "Name|Class|ID"
Bob|Class1|BBB
Mary|Class2|CCCC

Then you have three buttons:  Add a student, update a student, remove a student.
And finally you have the magic, let's number the student array so we can figure out which  (although you can cycle through to find the correct record, now in 6.5)  


To add a student, you simply parse the three fields and add it to the list;
To remove one, you select an entry from the list and then remove it
Edit, you select an entry from the list, and remove the entry from the list, but put the entry values back in the fields.

Add Button
---------------------------------------------------------
List:=@Implode(Name:Class:ID;"|");
NewList:=@If(MyList="";List;MyList:List);
@SetField("MyList";NewList);
@SetField("Name";"");
@SetField("Class";"");
@SetField("ID";"");
@Command([ViewRefreshFields])

Remove Button
-----------------------------------------------------------
Nums:="0":"1":"2":"3":"4":"5":"6":"7":"8":"9";
TheseElements:=@Elements(MyList);
ThisList:=MyList;
NumList:=@Subset(@Subset(@Text(@TextToNumber(Nums*+Nums*+Nums));-999);theseElements);
List:=NumList + (". " + @Word(thisList;"|";1));
Selected:=@Prompt([OkCancelList];"Select an Entry";"Select an entry to Remove";"";List);
@If(Selected = "";@Return("");"");
k:=@TextToNumber(@LeftBack(Selected;"."));
Entry:=MyList[k];
NewList:=@If(Entry !="";@Replace(MyList;Entry;"");MyList);
@SetField("MyList";NewList);
@SetField("Name";"");
@SetField("Class";"");
@SetField("ID";"");
@Command([ViewRefreshFields])


Edit Button
-----------------------------------------------------------
Nums:="0":"1":"2":"3":"4":"5":"6":"7":"8":"9";
@If(@Elements(MyList)<1;@Return(@Prompt([Ok];"No List";"There is nothing to edit yet!"));"");
TheseElements:=@Elements(MyList);
ThisList:=MyList;
NumList:=@Subset(@Subset(@Text(@TextToNumber(Nums*+Nums*+Nums));-999);theseElements);
List:=NumList + (". " + @Word(thisList;"|";1));
Selected:=@Prompt([OkCancelList];"Select an Entry";"Select an entry to Remove";"";List);
@If(Selected = "";@Return("");"");
k:=@TextToNumber(@LeftBack(Selected;"."));
Entry:=MyList[k];
NewList:=@If(Entry !="";@Replace(MyList;Entry;"");MyList);
@SetField("MyList";NewList);
@SetField("Name";@Word(Entry;"|";1));
@SetField("Class";@Word(Entry;"|";2));
@SetField("ID";@Word(Entry;"|";3));
@Command([ViewRefreshFields])

------------------------------------------------------

Now, I didn't go through and test for BLANK values, so you might have to do that, but you get the idea.

0
 

Author Comment

by:jforget1
ID: 16960186
Thanks to all I am sure between all this information I will be able to get a good solution together.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question