Re: testing "picture" fields?
Posted in 1997
.....and my answer is the following with a supporting comment from Jonathan: ----------------------------------------------------------- On Tue, 9 Dec 1997, Jim Kistler wrote: > I think I have the answer to user-inserted blanks firing my change > logic for a picture field..... > > [ f00 ] > [ f01 ] > > f00 = tableA.pic_field, picture = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"; > f01 = displayonly type char; (set to f00 value when form started) > > I test for user changes to the pic_field column of tableA with the > instruction: > ------------------------------ > after editadd editupdate of tableA > if (f00 <> f01) or > (f00 is null and f01 is not null and > f01 != " - - - - ") then > . > . do whatever.... > . > ------------------------------ > > For character type fields, I would normally test for user inserted "spaces" > with: > > fxx != " " > > but for my picture field, the test needs to include the literal characters. > > Does this make sense?....I believe it works okay! Yes; the PICTURE controls characters which will be present in the field. If the user types nothing, the field will still contain the dashes. Glad you've got it solved! Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h> ---------------------------------------------------------------- Thanks Jonathan! Jim -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Jim Kistler - kistler@an.hp.com # Some see issues and ask, "Why? Hewlett-Packard Co. Imaging Systems # Others see opportunities and 3000 Minuteman Road, Andover, MA 01810 # ask, "Why not?" TEL: 508-659-2251 - FAX: 508-687-7265 # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-