Custom CSS for Notes component

Hi, community!
I hope you are fine!
I find useful trick to control input data format without any computed columns and JS
If i need number entry so i have Number entry component, but recently users try to copy form web site and past to this number component ant it can’t recognize if 200$ just 200
In this case i can use Notes component to point to numeric basic column and it works well, it recognizes 200$ as numeric 200.
But Notes component looks too fat for simple numeric entry.
May be, someone already know custom css to apply style of Number entry component to Notes component?


Thanks for advice!
Alexey!

Wouldn’t a Text Entry component work the same way that the notes component is?

2 Likes

Ah,oh :upside_down_face: :sweat_smile: :rofl:
Yes, of course! Thanks Jeff!!!

And maybe you known some way to combine features of Numeric entry component and Text entry component without additional step with set column which will no costs update?

yes… is easy… HTML

Ou! Santa Uzo! Hi!
Again, you give to me New Year’s gifts!
Could you explain little bit more!
Thanks!

Explain what exactly you need. I’m a little lost with your explanation…

Do you want to be able to write $ character in a numeric entry… and reject all other characters?
or extract numbers from the entered characters?

I need to user entering price which is numeric.
But usually, they have a copy and paste the text like 200$ from another web site. So, i need to converts this text to numeric entry. Basically, without negative values.
Also, i don’t want to spend more than one update per form filling

so if someone writes hjhjdbhjbfe500$$$hdfkdfkdf
you wanna get 500 ?

Yes exactly. Also if -500$ must 500

what is some one writes jjfhfhf-500$$djbjdb30$$$$
then we have 2 numbers, what you wanna do in that case?

Usually, they do not to do like this.
Because staff usually do copying from only four sites and commonly is 4000р. or 4000руб or 4000 руб and never like “4000руб 2000руб”

ok this will give the first number…

have a text entry value as a p1 in the JavaScript column:

if(p1){
const match = p1.match(/\d+/); 
return match ? parseInt(match[0], 10) : null;
}
return

Yes, thanks, of course!
Computation column, yes i had try to reduce the qty of calc columns.
Also, rollup column can’t sum text and i must to do additional math to multiply by one. It is not so big problem because, usually i mult. by goods qty

Thanks, thanks!

But wait… I will give you a better code… this one is not that great

1 Like
if(p1 || p1==0){
var regex = /[^0-9,.]/g;
return p1.toString().replace(regex, '')
}
return

I think this one will cover all problems

1 Like

Thanks!
Yes, we can imagine many different tricks just to filter input data but, so beautiful Glide and we must to do many coding just for simple and common things.
Another computed column must to add thousands space. Because math and basic column can show like 1 000.
Instead, math i need to show the value in a common Glide table component so, so many computed columns just to simple filter and to show data.
Thanks, Uzo!
May be next year will be “beauty” and Glide give as native tools to filtering input data.
p.s.
May be ABS of basic column “number” combined with text input is enough
Thanks, for all for brain storming!

1 Like

I completely forgot why I wanted to use Notes specifically: I thought it would save updates when using input on custom form on new screen. But it seems that the text input component now does not take into account the input of each character, but only one, when exiting the editing area. It pleases, it changes everything a lot!

I think if they paste “4000руб” to a number entry component, it renders as 4000 anyway.

1 Like

Hi, ThinhDinh!
They already tried and no luck