error message

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
blumski
Posts: 37
Joined: May 7th, 2018, 7:02 am

error message

Post 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 3953 times
Last edited by blumski on May 9th, 2018, 5:13 pm, edited 1 time in total.
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Re: error message

Post 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()));
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: error message

Post 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.
blumski
Posts: 37
Joined: May 7th, 2018, 7:02 am

Re: error message

Post by blumski »

Thanks so much sah. It works.
Post Reply