Making a 'number entry' required

I am using a number entry component and noticed there is no way to make it a required entry. Is there a workaround for it?
Thanks much

Select the number entry component and you should be able to find in the right hand side under general → options → required.

I don’t have that option. See attached screenshot of my screen.

In a details view you won’t have that option. What you could do is play with the visibility of two different buttons.

One button won’t submit the information and is visible when number entry component is empty… and perhaps show a message like “complete details” the other button will be visible when number entry component is not empty add then add row and say success (or whatever your desired operation would be)

You could add other visibility settings in the same manner to satisfy all your required components.

Here is an alternative to the approach that Eric suggested.

  • Replace your single button with a Button Bar
    – One side for Submit, one side for Cancel
  • In your Submit action, start with a conditional that checks the value of the CartsPickedUp column, and only proceed if it is not empty.

The effect of this will be that the button will always be visible, but the Submit option will remain disabled until a value has been entered into the CartsPickedUp input.

If you have multiple required values, then it’s worth rolling the check up into a single if-then-else column, eg:

  • If foo is empty, then (nothing)
  • If bar is empty, then (nothing)
  • If some other required field is empty, then (nothing)
  • Else true

The above would only return true if ALL required fields are not empty, so it could be used in the action conditional.

3 Likes

I believe you can create your component in a form screen, make it “required” by ticking the checkbox, copying the component in the screen panel on the left, then going to your detail layout and pasting it there. The “required” feature will stick I think.

(I think I recall @Robert_Petitto mentioning that this workaround might work.)

3 Likes

Yup!

I haven’t tried this, but does it actually do anything other than attaching the “Required” label to the component? What I mean is, if you paste it into a details layout and then add a button or button bar to that screen, will the “required” component interact with those buttons in anyway? (ie. to prevent submission). I wouldn’t think so? In which case, it’s really just cosmetic, yeah?

2 Likes

Yes, it’s just cosmetic and I consider it a bug because you can’t remove it after that.
I have a lot of entry components by reason of a lot of visibility and filter settings and it still works fine to write them into a table without any buttons.

Ya…just cosmetic.

3 Likes