Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating A dialog Box for selection

Posted on 2005-05-11
4
Medium Priority
?
271 Views
Last Modified: 2013-12-18
Form 1 has a field called GroupSelect with the values

Owner
Worker
All

It also has a SendTo Field.

View NagView has all my user with group assignment

Owner   Bob
Worker Stan
ETC

I want to remove the GroupSelect field and make SendTo Computed and have a button on the form that pops open a dialog form with the GroupSelect(CheckBox) and GroupUsers(CheckBox).  I would like for the default for GroupUsers to show all the names from the NagView view, but no one checked.  When they select a value in GroupSelect such as owner - check mark will appear by Bob - etc etc etc

Here is the code that works now for a prompt

choices:= @Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; "All"; "Username"));
defaults:= @Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; EmailAss; "Username"));
@If(@IsError(Result);"";result);
st:= @Prompt([OkCancelListMult]; "title"; "prompt"; defaults; choices);
    @If(st=""; ""; @SetField("SendTo"; st))

0
Comment
Question by:Jaziar
  • 2
  • 2
4 Comments
 

Author Comment

by:Jaziar
ID: 13981211
Here are the steps I have taken thus far

Created a form called SendToUser
There are 2 fields GroupSelect and SendTo
GroupSelect has values Owner - Worker - All

In the Postrecalc - I have

result := @Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; "All"; "Username"));
    @SetField("SendTo"; @If(@IsError(result); ""; SendTo=""; result; SendTo))

In the SendTo formula is
@Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; EmailAss; "Username"))

Here is my action button in Form 1

@DialogBox("SendToUser";[NoCancel];"Address");

It kinda looks like it is working but is not
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 13983697
Have the GroupSelect radio button field set to refresh form when field value changes.


Have the choices lookup for the GroupUsers lookup all names, applying @Unique.  That way, all names are available to display at all tims.

Have its value formula just lookup the users assocaited with the group currently selected in the other field.

0
 

Author Comment

by:Jaziar
ID: 13985927
Have the choices lookup for the GroupUsers lookup all names, applying @Unique.  That way, all names are available to display at all tims.

Have its value formula just lookup the users assocaited with the group currently selected in the other field.

putting these two together is my problem.

my SendTo is a checkbox - use formula for choices
@Unique(@Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; "All"; "Username")))

when I open the form it shows all the users names and nothing is selected (Perfect) - this is right so far
now when I click owner in the GroupSelect, I would like for all the names to stay there(or refresh) with the owners now checked.  It seems like I can not show all users and make the selection.  If I only wanted to show the selected users it works fine - but I need for them to be able to see the user and select a additional person if they need to
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 13991896
The VALUE formula for SenTo should be @Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; GroupSelect; "Username"))
That should return the members of the selected group, so that those become the value of teh SendTo field, which means that all mathcing values get checked off.

To help debug this, please add some computed text with the following formula:

lookup := @Name([CN];@DbLookup("":"NoCache";""; "(Users By Group)"; GroupSelect; "Username"));
msg := "The value of SendTo (boxes checked off) should be:";
@Implode(msg : @Text(lookup); " ~ ");

The computed text should show the members of the group, and the values should all exactly match the text of the appropriate check boxes in SendTo.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview

810 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