Page 1 of 1

error message

Posted: May 7th, 2018, 7:16 am
by blumski
It seems that I wasn't clear in my question.
What I want is the code to produce the error message like in the picture below
Screenshot_2018-05-06-17-06-49.png
Screenshot_2018-05-06-17-06-49.png (66.48 KiB) Viewed 4109 times

Re: error message

Posted: May 7th, 2018, 7:53 am
by sah
Below is a sample for your perusal

//Parent's age should be 12 years more than child's age.
if Relationship(curocc()) = 4 and Age(1) < Age(curocc()) + MinAgeDiffBtwnChildAndParent then
errmsg("%s's age should be 12 years more than %s's age",strip(Name(1)),strip(Name(curocc())))
select("Correct parent's age",Age(1),"Correct child's age",Age(curocc()));

Re: error message

Posted: May 7th, 2018, 5:29 pm
by aaronw
In addition to what sah said take a look at the errmsg function. The use of errmsg and select together will give you the behavior you want.

Re: error message

Posted: May 20th, 2018, 5:44 pm
by blumski
Thanks so much sah. It works.