cancel
Showing results for 
Search instead for 
Did you mean: 

working with Validation of Data

Former Member
0 Kudos

Hi. VC Experts.

I am currently working with VC 6.0. Where I am working with Validation of Data.

we have fields like Emp, Earea, Joining date (month & Year), Ending date((month & Year) etc.,

Here we have one push button 'select'.

Here what my client asks is unless and until, user fills all details then only

the submit but 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.

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vijay,

sorry

please rewrite the formula for the button disable as::

NOTE:: in the formula i have used '<''>' which nothing but a lessthan symbol and greater than symbol without single quotes (i.e. not equal to)

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))

and make sure you have placed the date picker UI controls for your date functionality.

this will not work for calender UI control on the form.

and othe important point is the joining date should be less than ending date then only the button will be enable..

if you want your joining date should be greater than ending date then write the formaula 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))

i tried this

its working for me

Regards

Srinivas

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi.

srinivas.

It was worked initially. But now it is not working. I don't know why it is not working I have used the formula 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))

Still it is considering only Month but not Year. Please reply to this.

Former Member
0 Kudos

Hi. Srinivas & Others.

Can you please provide the solution.

Thanks & Regards

Former Member
0 Kudos

Hi vijay,

Are you using the date picker UI control on the form. if not use only date picker UI control

This formula works only for date picker UI control

Regards

Srinivas

Former Member
0 Kudos

Hi. Srinivas.

Thanks for replying me. Can you just please brief me what is Date Picker UI control.

Thanks in advance.

Former Member
0 Kudos

Hi Vijay,

on the story board

select design tab

and select your form right click and select confiure element

at bottom right hand side corner you can see a small window

on that window select + icon and from the opened window select date picker UI control

Former Member
0 Kudos

Hi. Srinivas.

Thanks for your reply. I will try for that. and I will let you know.

Adding to this can you have any idea that after deploying the model, to get same column window size for all models. since we have 3 models with hyperlink options and having common fields in 3 models.

and If you click on select push button you can go to other models where we have written the formula.

But we are getting different window sizes from one model to another model.

Thanks & Regards

Edited by: Vijay Kumar on Nov 14, 2008 3:19 PM

Former Member
0 Kudos

Thanks for all.

Former Member
0 Kudos

Thanks Srinivas. Can you Please provide your Mail ID.

Problem Resolved. I have Assigned points.

Edited by: Vijay Kumar on Nov 12, 2008 11:20 AM

Edited by: Vijay Kumar on Nov 12, 2008 1:46 PM

Former Member
0 Kudos

Hi Vijay,

please rewrite the formula for the button disable as::

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))

and make sure you have placed the date picker UI controls for your date functionality.

this will not work for calender UI control on the form.

and othe important point is the joining date should be less than ending date then only the button will be enable..

if you want your joining date should be greater than ending date then write the formaula 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))

i tried this

its working for me

Regards

Srinivas

Former Member
0 Kudos

hi

sorry rewrite the first formula as

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))

Former Member
0 Kudos

Hi. Srinivas.

Thanks for your reply.

Thanks

Edited by: Vijay Kumar on Nov 24, 2008 2:05 PM