Validation on underlying form.

Have a database I have been working on for some time and have posted several questions on here recently. Have one more I am not sure whether it is possible or not. In the database there is an office record and also a user record, these are tied together via their server ID.

What I am checking to see here is on the office record there is a button the office clicks to say that a step is done, the code is below. What I have been asked to try and work in here is when the office clicks the button to certify that the step is done that it scans all the user records for that office and validates that the value for a particular field is not empty. If there is one user record which has this field blank then it should fail and alert them that they did not respond to one or more of the questions on the user record.

Basically they are supposed to sign off on each record that they have the users computer and then on the one office record they certify that all are ready to be picked up. Problem is they are not respond to the certification on the user records and clicking the overall certification button on the office record. This is causing all sorts of headaches.
@DialogBox("ibpc_pickup_signoff";[AutoHorzFit]:[AutoVertFit]:[SizeToTable]:[OkCancelAtBottom];"IBPC Signoff");
@If(accept3 = "No" ;
        @Prompt([Ok];"Alert";"You must accept all terms and conditions. You have responded No to the first condition,  please review and press the Accept and Submit button again if you are willing to accept all of the conditions specified.");
    ); "");
@If(@Prompt([YesNo];"Reclamation Submission";"This form is about to be sent to initiate the reclamation process.  Are you sure you would like to send it now?");"";@Return(""));
FIELD status:="Ready for Reclamation";
FIELD pickup_flag:="done";
SendTo :=controller;
CopyTo :="Field Technology";
Subject :=  office_num_adjusted+ " says they are ready for reclamation. ";
Remark := office_num_adjusted+ " is ready for reclamation.  Please click on the following link to review and approve the information.";
@MailSend(SendTo; CopyTo; ""; Subject; Remark; "";[IncludeDoclink]);

Open in new window

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.

Sjef BosmanGroupware ConsultantCommented:
I hope the story itself is not so important, because I think I missed the previous episodes...

The general idea: create a lookup-view, first column contains the server name (?) as key, categorised, the second column the field that should have been filled in. Then you use a @DbLookup to get the info you need:

x:= @DbLookup("":"NoCache"; "", "LookupView"; servername; 2)

That would return the second column for ALL documents matching the key. Now, the result in x would be a list of values, something like


Then use:

@If(@Elements(x)=@Elements(@Trim(x)); ----ok----; ----wrong----)

The ok and wrong need to be replaced by proper code of course.

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
Stan ReeserTechnology StrategistCommented:
Does this have to be Formula language?  This would be a walk in the park in LotusScript.
jforget1Author Commented:
I was figuring it would have to be converted to LS, I just would also need to include the validation which is in the code currently.

And no the back story is not important, I just have asked several questions related to this DB. The issue which is a challenge for me is having the Action happening on one form(office record), but doing the value check on another form (user form).
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Sjef BosmanGroupware ConsultantCommented:
May we see the solution??
Stan ReeserTechnology StrategistCommented:
yes yes!
Sjef BosmanGroupware ConsultantCommented:
Here some pseudo-code:

If no solution is shown Then
   Assume "own" is less "own" than "own" should be...
   Write additional comment
   Click Object button
   Appreciate splendid solution
End If
jforget1Author Commented:
I said that incorrectly, I just decided that this one was going to be a little too complex and we took another route.
Sjef BosmanGroupware ConsultantCommented:
You should have said so in the first place! This is not good for my health, being of a rather suspicious nature...

jforget1Author Commented:
I just could see this one was a little over my head. I apologize for the confusion.
Stan ReeserTechnology StrategistCommented:
I think that you should give sjef the points, he did give you a solution.  Not really his fault if implementing it was out of your comfort zone.  He also would have worked with you had you responded to get it to work.    Sjef's about as standup a guy as they come.  Pulling back points is also a good way to get ppl to ignore future questions :-)
Sjef BosmanGroupware ConsultantCommented:
There are indeed a few people on my personal EE-blacklist, but jforget1 isn't one of them, far from that. He's got a lot of credit here, having asked 200 questions so far. But you are correct, a properly answered question should be rewarded, even if the answer doesn't solve the asker's problem (for some reason).
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.