This topic is locked
[SOLVED]

 Dropdown Specific Group Names From Database

10/7/2013 10:26:36 AM
ASPRunnerPro General questions
G
gonzalosb author

Hi All,
ASPR 7.2

MS Database
i have a table call USERS, inside i have a list of users and asigned group number.
ID , Name , Group

1 , Adam , 1

2 , Maria , 6

3 , Louis , 1

4 , Jimmy , 2

5 , Poul , 2

6 , Mary , 2
i have more than one section with checkbox in the same page were i need to display on each section only the names for each group.

in other words i need to create in the same NEW/EDIT page a checkbox section only with those mark as "Group 1" , other only with "Group 2" and so on.
Group 1
Adam

Louis
Group 2
Jimmy

Poul

Mary
Group 6
Maria
Any ideas?

thanks for your help in advance.

admin 10/7/2013

Could you show us some sort of screenshot that would explain what you trying to achieve?

G
gonzalosb author 10/7/2013


,

as you see on picture 1 users have a group number asign.

on picture 2, have a group name ( Group # ) and only the names on that group.
PS 1: picture 2 was edited to display names on the respective groups.
PS 2: picture 2, Group 3 have 2 names extra, dot worry, those are on the second page on the name list non show on picture 1

admin 10/7/2013

Okay, this picture is making some sense. The question is how you want to save that data?

G
gonzalosb author 10/7/2013


,

please, keep in mind that i have arround 10 groups, not only 3.
in the picture 2 im useing a script to get the names one in top of the other and not NAME,NAME,NAME but its the same

admin 10/7/2013

Okay, here is what you can try.
Setup "Group 1" as a Lookup wizard, set lookup type as 'set of checkboxes', choose Users as a datasource table for this lookup wizard and add th following WHERE clause:

" where group=1"


For second lookup wizard it will be " where group=2" etc

G
gonzalosb author 10/7/2013

thanks!!! i will try it and will let you now.
thank you Sergey

G
gonzalosb author 10/8/2013


,

pic 1 show checkbox setup and pic 2 the result I get <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=72256&image=3&table=forumreplies' class='bbc_emoticon' alt=':(' /> . what I did wrong?

admin 10/8/2013

If group is a text field you need to use the following:

"where group='1'"
G
gonzalosb author 10/8/2013

GOT IT !!!! is that without WHERE...

"group='1'"


Thank you Sergey !!!