Issues with saving new records


Author
Message
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
When designing a form, one of our requirements is to allow the end user to enter text such as "Police Uniform" for a description.  However if the user types "Police Uniform    " (spaces), we want to trim the field.  So I turn on Trim Right in the BO.  Now I cannot type a space after the letter "e" in police. 

So I was advised to change the BindingUpdateMode to "OnValidation".  Now when I add a new record, type in a description like above, the description is NOT saved and is blank in the database and is displayed as blank on the UI form!

What gives?

Ben

Replies
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
I think what Greg is saying, instead of doing the Trim'ing the way StrataFrame currently does it, why not add code to the .Designer file automatically that will .Trim each field correctly before saving the entry (Insert, Update) based on the Trim setting in the Business Object Mapper?

Ben

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Yep, that is what I'm saying. BigGrin



Why not just add an event handler automatically to handle the CheckRulesOnCurrentRow in the designer? The user could have another handler. They would just have to be clear that trimmed fields might or might not yet be trimmed.
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Trent,

You are correct.  I cannot type something like "Police Officer" because the BO keeps trimming the space much like setting it up via the Business Object Mapper.

So what do you suggest?  Here is what I want:

User types "Police Man    " (trailing spaces)

We automatically trim the field to "Police Man"

Ideas?

Ben

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You're wanting an automated solution for something that will take some engineering.  This will have to be done at the BO level or require a change to the textbox control.  You can create your own textbox by inheriting the StrataFrame textbox.  In the Validating event you could manage this.  (I would recommend having a property to determine whether or not to do anything.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ben Kim - 18 Years Ago
StrataFrame Team - 18 Years Ago
Ben Kim - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Greg McGuffey - 18 Years Ago
                         In this example you would never be able to add a space.
Trent L. Taylor - 18 Years Ago
                             I think what Greg is saying, instead of doing the Trim'ing the way...
Ben Kim - 18 Years Ago
                                 Yep, that is what I'm saying. :D

Why not just add an event...
Greg McGuffey - 18 Years Ago
                                     Trent, You are correct. I cannot type something like "Police Officer"...
Ben Kim - 18 Years Ago
                                         You're wanting an automated solution for something that will take some...
Trent L. Taylor - 18 Years Ago
Ben Kim - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Ben Kim - 18 Years Ago
Ben Kim - 18 Years Ago
StrataFrame Team - 18 Years Ago
Ben Kim - 18 Years Ago
StrataFrame Team - 18 Years Ago
Ben Kim - 18 Years Ago
StrataFrame Team - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search