Can't make Duration field mandatory

tlock
Tera Guru

I have a duration field on a form that has the flag set for it to be mandatory, that's not the problem.   The problem is when the form is loaded up, the duration field sections get populated with zeros and SN then sees the zeros as data having been entered into the field, so the mandatory flag gets greyed out right away.   Here's what the duration field looks like right after the form has finished loading:

12-16-2016 12-48-24 PM.jpg

Any ideas on how to get around this?

I tried setting the default values for the duration field sections to be NULL in the dictionary attributes for the field, but that didn't work.   I know that I could do an onSubmit script to check for all zeros on the duration field, but I would rather not have to do it that way.   To me, this seems like a flaw in the way that SN has set the duration field type to function with it loading zeros in this way.

Thanks

1 ACCEPTED SOLUTION

I didn't have anything set in the default value field at all.



I've since discovered that this is solely an issue with my personal DEV instance of SN, in my company's instances this is not a problem.   I should have checked that first.   Since this isn't an issue where I'm going to end up using this form, I'm not going to worry about it at all.



Thanks for trying to help sort this out.


View solution in original post

6 REPLIES 6

Raju Koyagura
Tera Guru

I don't see any problem in my case. I set mandatory on dictionary entry (no scripts)


find_real_file.png



How are you making mandatory of that duration field?


I have mine set as mandatory probably the same way as you, the Mandatory checkbox on the dictionary entry for the field.


It happens if you have a default value to zero. Just check if you any default value and clear the default value field


1. With default value


Screen Shot 2016-12-16 at 4.13.45 PM.png


This is what I got


Screen Shot 2016-12-16 at 4.14.36 PM.png


2. With this default value


Screen Shot 2016-12-16 at 4.14.03 PM.png


I got this. But when I click on the form space it shows as mandatory


Screen Shot 2016-12-16 at 4.14.26 PM.png



See if this is same as you case