1. Tracy Lamb
  2. PowerBuilder
  3. Thursday, 27 June 2024 21:54 PM UTC

Hi all,

I have a dw control on a tabpage with a user event, ue_create_form.  On the dw object itself ( datawindow painter ) none of the columns has a validation rule, validation message, or initial value.

Here's the code for ue_create_form:

this.InsertRow(0)
this.SetItem(1,"workorder", il_FormID)
this.SetItem(1,"estimate_date", ldt_now)
this.SetItem( 1, "repair_tech", gi_EmployeeID )
this.SetItem(1,"create_user",sqlca.logid)
this.SetItem(1,"create_date",ldt_now)

this.Update(TRUE,TRUE)
this.SetColumn("estimate_date")
this.SetFocus()
itab_lab.of_set_form_status(this, FORM_NOT_FINISHED)

The first time the form is created, I keep getting a validation message, "Value required for this item".  I do use PFC2022, but of_setReqColumn is never called in either the dw control or it's ancestor.  If I delete the form, then re-create it, I don't get the message.

It's not a big problem, but it's annoying because I clearly set the value for each column in the ue_create_form event.  

I looked in the help file and found something about validation rules and extended properties.  However, I couldn't figure out how to get to the extended properties.  Directions seem clear, but I still couldn't find it to see if I have any validation rules defined for either the dw object or a column in the dw object.

Any suggestions would be appreciated.  Using PB2022 R3 and PFC2022.

~~~Tracy

Accepted Answer
Tracy Lamb Accepted Answer Pending Moderation
  1. Friday, 28 June 2024 13:44 PM UTC
  2. PowerBuilder
  3. # Permalink

I didn't realize (or forgot) that on a column's properties panel in the dw painter, under the Edit tab, there is a checkbox for "Required".  All I had to do is uncheck that box.  (Had nothing to do with PFC.)  Thank you Miguel for that suggestion.

~~~Tracy

 

Comment
There are no comments made yet.
Tracy Lamb Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 22:47 PM UTC
  2. PowerBuilder
  3. # 1

I had to delete the offending column from the query, then add it back in.

~~~Tracy

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 28 June 2024 01:17 AM UTC
Thanks for sharing the solution!
  1. Helpful
  1. Tracy Lamb
  2. Friday, 28 June 2024 13:39 PM UTC
That worked, but there was a simpler solution, posted below.

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 22:44 PM UTC
  2. PowerBuilder
  3. # 2

If one of your columns has the "required" attribute checked, I think the PFC's will automatically validate those columns to be filled.

Comment
  1. Tracy Lamb
  2. Thursday, 27 June 2024 22:47 PM UTC
Required attribute is not checked.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.