Auto uppercase field input before saving

may i know what is the best way to uppercase of the field value before saving into the table?

i know we can do format rules, to display it as uppercase, just thinking if it is better if we could save it with uppercase?

Solved Solved
0 15 4,338
1 ACCEPTED SOLUTION

First create an action behavior

In the customer detail form, attached the event action,

View solution in original post

15 REPLIES 15

Please explore if any of the three different workarounds proposed in the post below help you

Thanks, @Suvrutt_Gurjar,

Do you mind explaining the method by @tsuji_koichi

There is no workaround to convert the data entered through the form or quick edit mode on detail/table view, meaning there is no workaround to transform the data to be saved to the source DB.

I would suggest you create another column refering to the data entry fields, and convert the data to UPPER case or whatever you want through the expression.

Original data entry field is made avaialble and visible on Form view only by setting showif constrain usiing Context(ViewType)=Form expression.

Similarly, the display fields is made avaialble by setting up showif constrain to the contrary, i.e. Context(ViewType)<>Form

I think it will be better for @tsuji_koichi to further elaborate as it is his suggestion.

However, I will respond till he adds his further insights.

I believe his guidance is

  1. A) Create Column 1 Called say [AnyCase] where the user makes the data entry in any case- lower or upper.

B) The column [AnyCase] is visible only in form view - the view where user makes data entry Use show_if constraint for [AnyCase] as CONTEXT(โ€œViewTypeโ€) = โ€œFormโ€

2)A) Create another column 2 called say [UpperOnlyCase] in the table as per your need to save and show upper case value ( real column) or only show upper case value (virtual column)
B) App formula for this column 2 is UPPER([AnyCase])
C) Show_if constraint for this column [UpperOnlyCase] is CONTEXT(โ€œViewTypeโ€) <> โ€œFormโ€ . So in detail and table views this upper case column will show and [AnyCase] column will hide.

  1. You can choose identical display name for both these columns, so that for user they appear as one column in any view.

Could the Event action method work better in this case as it would not need any extra column?

Thanks Akeksi for the suggestion, yes tried it โ€ฆ it works like charm. thanks for it

Hi Aleksi, could you please help me with an example of how this works as I canโ€™t understand.

@d_alvarez
You need to create an action with the UPPER() expression, set its display to Do not display and set this action as a Form Saved Event Action of your Form UX.

First create an action behavior

In the customer detail form, attached the event action,

Thank you!

Why don't you add a feature for Format text Bold, Upper, Proper, and Lower text for column instead of using a formula?

Youโ€™re welcome

@LeventK @EugeneB, hank you very much for the examples, it works great

Excellent

But when the column is one used to create a _ComputedKey field, it does not allow you to do it.

Because key values cannot be edited, and by extension, any values that make up a key value.

There is no way to modify the userโ€™s input before it is saved.

What you can do though is to force your user to input things in all uppercase. Try this as a valid_if expression

FIND( UPPER( [_THIS] ) , [_THIS] ) <> 0

FIND() is one of the only (if not the only) Appsheet expression that is case sensitive.


By the way, I highly recommend NOT using computed keys for any Table, just use UNIQUEID() in a hidden column.

Top Labels in this Space