Link to home
Start Free TrialLog in
Avatar of kali958
kali958Flag for United States of America

asked on

Required Fields

I have a call log form that has 7 required fields. I have put in the correct Input Vaildation on them all and they work. Here is the question. The users have asked me that if it is possible to move around on the form and then when they save it have the vaildations kick in. For example, the required fields are:

Call Number
First & Last Name
Policy Number
Firm Code
Rep Code
Caller Type

Sometime when they are on a call they will not get the information in that order when they are talking to the customer and they would like to be able to "jump around" to different fields and then when saving if they missed anything have the error come up then and they can input the correct data. I was hoping that there might be something I could write in the Postsave or Querysave. I am still a little new to using the fuctions on the form level than at the field level.

Any help would be great! Thanks
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Turn off automatic refresh of fields on the form and/or individual fields then in their ''save' or 'submit' button check if for @If(@IsValid;"";:return("")) to check all validations are OK for starters.

Steve
SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HemanthaKumar
HemanthaKumar

First it is messy to have validation in the fields, unless the next field is computing depending on the previous field validity.. So,
Write a script in querysave event to check the fields, and depending upon the validness either continue save or abort !

~Hemanth
Avatar of kali958

ASKER

I do have fields for a Refresh Document is needed

I like the @If(IsDocBeing Saved;.....

I would love to write a script in querysave event,but my LS is really poor and not my strength - any other suggestions?
LS is not that bad you can learn it pretty quick from notes help and examples. Anyway, one fine day you are going to have problems with this implementation..good luck
Avatar of kali958

ASKER

What do you mean that there would be problems with this implementation?
1. It will be harder to debug if any error occurs. . you have to go thru each and every field. (search through this forum about input validation you will see..)
2. If in future u need to change any of the validation and if you don't have the documentation on each field design then you are going to have a heck of time in finding and modifying the validation


If the code is centrally maintained in QS, it is easier to modify and any problems you can fix it by using a debugger..Where formula validation cannot be debugged !

Search this forum you will find interesting stories and nightmares on validation.. and refresh issues
Avatar of kali958

ASKER

Okay, here is one more twist

I have two buttons on the form - Save & Add Another and Send to Filing.

Save & Add Anothers, saves the document, closes it, and opens a new one.

Sent to Filing will @MailSend the call to the correct department.

I tested the @If(!@IsDocBeingSaved; @Success; with my vaildation and it works as long as I just click a normal save & close button.

Would I need to add validation into the Save & Add Another / Send to Filing?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kali958

ASKER

Final Solution: I am going to use the solution

In your field validation, add @IsDocBeingSaved:
    @If(!@IsDocBeingSaved; @Success;
        your previous validation
    )
   

but put a little mix of LS on some parts of the form in the events.

Thanks for the help
Thanks! Only a B?
Avatar of kali958

ASKER

Next time - It will be a A, I am still having some small issues.... :)
I'll keep it in mind!