on 12-01-2008 9:03 AM
Hi. Govindu and ohters.
I really appreciate your efforts in helping others.
I am currently working with VC 7.0. Where I am working with Validation of Data.
we have input buttons( fields) like Emp, Earea, Joining date (month & Year), Ending date((month & Year) etc.,
Here we have one submit button 'submit'.
Here what my client asks is unless and until, user fills all details then only
the submit button should be enabled. Otherwise submit button should be in disable mode.
I could be able to write formula for 'submit' button's properties( Disable) like this.
BOOL(IF(LEN(@Emp_code)0 AND LEN(@Earea)0 AND LEN(@Edept)0 AND DSUB(DVAL(@Joining_date), DVAL(@Ending_date),'D')<0 ,false,true))
Here condition is always make sure that 'Joining date' should be greater than 'Ending date' . where it is working fine for all fields except Calender Year month(Joining date & Ending date).
the calender year month format is Example : """" May 2007""""
But it is considering only month But not year.
Can you kindly provide your inputs.
Edited by: Vijay Kumar on Dec 2, 2008 10:51 AM
I think we need to set a few properties and we might just have a solution:
First, set the Formatting for both the "From" and "To" fields to : DSTR(@Calander_Year_Month, "MON YYYY"), DSTR(@To,"MON YYYY") respectively.
This is done in the Control Properties of both fields (simply double click their names in the right pane)
in the Formatting Tab, choose Custom and then set the formatting expression to the above line.
Then, create a new Expression Box of type Numeric (NUM1) and set its expression to: DSUB(@To,@Calander_Year_Month,'M')
this too is done in the NUM1 control properties, in General Tab, enter the above line in the Expression field.
This way you can set the validation rule to be that the value of the new numeric field NUM1 be Equal or more than 1.
Hope this helps.
Omer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the disabled property of you submit button put in the condition for all your field as follow:
ISNULL(var1) OR ISNULL(var2)......
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. Murtuja.
Thanks for your valuable reply. The formula which you have given that is working for all fields. I have tried this.
But my requirement is here we have Calender month From and To values are there.
Here Calender month from value should be less than to Calender Month To value.
Then only the submit button should be enabled. That I am not getting. Please can you
help me out.
Thanks & Regards.
Hi. Murtuza.
Thanks for Your valueable reply. I have already been trying with the following formula.
But still I am not getting expected result.
BOOL(IF(LEN(@Material_Type)<>0 AND LEN(@Plant)<>0 AND LEN(@Vendor)<>0 AND
DSUB(DVAL(@To), DVAL(@Calendar_Year_Month),'D')<0 ,false,true))
I don't have any problem with input buttons( fields) like Material type, Plant, Vendor.
But _'Calender Year Month From' should be less than to 'Calender Month To' then only the submit button should be enabled. Otherwise submit button should be in disable mode. This is not working.
The calender year month format is Example : """" May 2007""""
But it is considering only month But not year.
means It only considering Month only, It is not considering the Year. Please let me know the your information on this.
Thanks and Regards
Edited by: Vijay Kumar on Dec 3, 2008 10:35 AM
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.