Help me rewrite this formula

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
JaziarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

scottrmaCommented:
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
JaziarAuthor Commented:
Its never continuing with the action - even though both fields are filled in - it always closes the window.
0
JaziarAuthor Commented:
also is there a cleaner way to put the @Ifs together
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

SandraECommented:
If the document is open when this code runs, you need to save it before you close it.
0
scottrmaCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
scottrmaCommented:
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
JaziarAuthor Commented:
I got it working - thanks - I wish someone would look at my other question that is open as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.