Dimas Prayoga
Dimas Prayoga

Reputation: 21

I'm using PowerBuilder and have a problem with the ( if, or, and ) condition

what i want if i choosed one of checbox but i don't inputed the text or 'c_ao', then messagebox is displaying

i have tried edit the query, like edit symbol "()" position

if Not IsNull(f_na) or Not IsNull(f_dep) or Not IsNull(f_krd) and IsNull (c_ao) then messagebox ('Warning','need fill in C_AO') return end if

i have 3 checkbox ('f_na','f_dep','f_krd') 1 input text/singelineedit ('c_ao')

my expectation is if i choosed some of checkbox in datawindow, and i don't inputed the input text/singelineedit or 'c_ao' then then messagebox ('Warning','need fill in C_AO') is displaying

Upvotes: 0

Views: 1160

Answers (1)

Matt Balent
Matt Balent

Reputation: 2397

Since the first part of your logic is for any of the three checkboxes to be checked you would do this:

IF (f_na.checked OR f_dep.checked OR f_krd.checked) AND ISNULL (c_ao.text) THEN
   Messagebox(blah, blah)
END IF

This looks to see if any of the checkboxes have been checked and if so, is there text in the singlelineedit control.

Upvotes: 2

Related Questions