?
Solved

Help me rewrite this formula

Posted on 2003-02-25
7
Medium Priority
?
208 Views
Last Modified: 2013-12-18
I have two fields on a form that is populated from a view.  The fields contain a list of names example:

Requested_Approver -> Bob Socks;Jimmy Johnson
PME_Approver -> Bud Wiser;Chuck Roast

I have a action button called approve - someone from each list has to approve the form.  I set up a hidden field called Approve_Checks - so if Bob its the approve button a DE is placed in the field, then the action should stop because someone from the PME_Approver list needs to approve.  So now when Bud checks approve - the hidden field will append PME - so the field look like DE;PME

Then if both are there the action should continue on through the rest of the program.  Here is what I have thus far:

@If(@IsMember(@Name([CN]; @UserName); Requested_Approver); @SetField("Approve_Checks";Approve_Checks:"DE"); "");

@If(@IsMember(@Name([CN]; @UserName); PME_Approver); @SetField("Approve_Checks"; Approve_Checks:"PME"); "");

@If(@IsMember("DE":"PME"; Approve_Checks);""; @Return(@Command([FileCloseWindow])));

REST OF ACTION ->


<- END of ACTION

Any suggestions welcome.

A quick def. of problem.  I have two fields of names, someone from each field has to approve the document for the document to change states.  After the first person approves the action still must wait for the second one to approve, after the second approves the action should complete itself and change states of the action.

Thanks For All your time and help
0
Comment
Question by:Jaziar
[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
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

by:scottrma
ID: 8018049
Hi Jaziar,

Are you actually getting an error with the above formula, or are you just asking us to proof-read it? I don't see anything wrong with it off the top of my head.

Regards,

Scott
0
 

Author Comment

by:Jaziar
ID: 8018364
Its never continuing with the action - even though both fields are filled in - it always closes the window.
0
 

Author Comment

by:Jaziar
ID: 8018372
also is there a cleaner way to put the @Ifs together
0
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!

 
LVL 1

Expert Comment

by:SandraE
ID: 8018918
If the document is open when this code runs, you need to save it before you close it.
0
 
LVL 7

Accepted Solution

by:
scottrma earned 800 total points
ID: 8019022
Try this:

FIELD Approve_Checks := Approve_Checks;

@If(@IsMember(@Name([CN]; @UserName); Requested_Approver); @SetField("Approve_Checks";Approve_Checks:"DE"); "");

@If(@IsMember(@Name([CN]; @UserName); PME_Approver); @SetField("Approve_Checks"; Approve_Checks:"PME"); "");

@If(@IsMember("DE":"PME"; Approve_Checks);""; @Return(@Command([FileCloseWindow])));

Let us know if this works or not. Thanks.

Regards,

Scott
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8019055
Also check the document properties box for your Approve_Checks field. Make sure its datatype is TEXT LIST and not just TEXT and that the SUMMARY field flag is present.

Regards,

Scott
0
 

Author Comment

by:Jaziar
ID: 8019103
I got it working - thanks - I wish someone would look at my other question that is open as well.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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