April 1, 200322 yr Hello People! I was wondering if anyone has quick work-arround to error pages. I have seen some suggestions on this form but they involve running scripts and reconstructing databse...I would like to avoid scripting and use CDML stricly! The error I would like to capure/customise is: - User attempts to add/create a new record that, needs to be unique, already exists (eg. PO# already issued).:. it exsits-->send to page!? thank you very much!
April 1, 200322 yr If the PO# is an auto-entered number in the database then it'll be unique no matter what. Scripts are not necessary to handle errors through the web. All you need is to add field-level validation to trap for the dupicate value. When the use submits the form an error code is generated (it'd be 504 or 507 depending on how the validation is set up) and Web Companion returns the -error format file. If your format file has lots of IFs that trap for the expected errors you can customise the response.
April 1, 200322 yr Author Hello Vaughan! Unfortunately my POs are pre-defined and can't be auto-serial (I whish) so I have to validate it differently. I am not sure I understand what "All you need is to add field-level validation to trap for the dupicate value. " means. Please can you explain this a bit more! Thank You sir!
April 1, 200322 yr In "Define Fields" go to "Options" then "Validate" then select "Unique". At the start of the error page you can use [FMP-CurrentError] to determine what caused the error. An attempted duplication will cause an error. As Vaughan said, this could be 504 or other codes. Hope this helps. Garry
April 1, 200322 yr Author Oh ok! I have that validation setup already and that is exactly why I get the errors : "User attempts to add/create a new record that, needs to be unique, already exists..." what I do not know is how to make sure that 503 or 504 error is reflecting on error.html page! eg. -----Error.html----------- Sorry, but this "entered_data" (PO#) record already exisits. Please go back and enter a valid "PO"! -------------------------- is this possible? thank you
April 1, 200322 yr Use: [FMP-If: CurrentError .eq. 504] <b>This PO is not Unique</b> [/FMP=If] All the best. Garry
April 1, 200322 yr Author Thank you Sir! ...never knew you can capture errors this easily! Thank you very much!
April 1, 200322 yr You can do many, many things very easily in FM and CDML. That's why we love it very much
April 1, 200322 yr Author this is so refreshing after dealing with Access errors that are 98% clasified as "UNKNOWN XXXXXXX....have a nice day"
April 1, 200322 yr You will love FM more and more until you find the limitations. Then you will not like FMI, which somehow is responsible for FM and did good things, but also forget many important things which are making our life miserable. Then you will try Lasso and you will love it. But if you use Central European languages on web, then you start hate FM WC and Lasso... It is endless struggle.
April 1, 200322 yr Author aghhh....I guess I better Not programm for those people back home I am not a really a programmer by calling so..I can't say I make my bread of it....but I love grfx. web-oriented design so any technology is welcome. Any that I can get my hands on anyway... I am curious why would Cntrl. E language be a problem?
April 1, 200322 yr Somehow FMI and Lasso doesn't get the whole web idea and are messing the language META tags and they are also guilty of neglecting 8-bit on the web. I guess in their web thinking they froze something like 7-8 years ago. Now there *is* workaround for 8-bit CE languages and there *is* even patched WebCompanion. I still didn't discover what I will use in Lasso after my return to Czech Republic.
April 1, 200322 yr Author I see...1st thing I could think of is use embeded (spelling) custom fonts to trick the whole server & visitor but if the Meta tags are getting ripped... ...all I can do is watch!
April 2, 200322 yr One thing is sure; both are ignoring any proper META and serving happily gibberish to visitors. In any case I am OK with WC, but still lost in Lasso. In Lasso I can create custom tags for "on fly" translation when I will discover the pattern...
Create an account or sign in to comment