1st I have to thx u all of community. today my app shows in the biggest Tv cia of latam TV Globo and people is using the app that a developed with help of this community. I’m too happy!
Now I need to fix sth.
The main input is a text like a hash with 44 or 48 numbers that it´s a id of bills.
The type of bills that my project helps,the code has to begin with 8 and people cant insert dot, dashes or spaces. how can I assure that? Otherwise the user cant insert the record/row.
Today I accept and fix in the Google but I’m receiving many things, texts, msgs…code with dots, spaces …so forth.
Darren I have to thk u first of all. u helped me a lot.
Let´s go!
Your users manually enter this code? they can enter or I’m testing code bar reader. our light bills for instance comes with code bar and this long code like hash. like this
suppose that it´s your bill I need the code 8363…to pay for u in my internet banking.
or, your app needs to generate the code for them? not generate. the code comes in the bill.
if the app is generating the code, does it need to be unique? no.
if your users are entering it, do you need to validate it against a known list of codes? although each digit has a rule, in the first moment I only need to check if begins with 8.
You say “no dashes, dots or spaces”. Are they the only invalid characters? although as u can see the code comes with special char, let´s say, when people will pay they will need to type each digit or past if the codes comes like hash 8363…all together.
What about ~&$°£º™Q ? Would that be valid? - it doesn’t contain any dashes, dots or spaces no, no only numbers!
Maybe better to try and define the set of acceptable characters, rather than the unacceptable ones? only numbers. all I need is to check if it begins with 8 and there are no dot, spaces any other one only numbers. got it?
you can scan this code in Glide, no need to manually enter
also when they enter manually … you can show warning if contain characters that you don’t allow or substitute them with “” empty
Thx Uzo! I discovered the scan code a few days ago. I’m intermediate let´s say…so I use to come here to learning. i.e. I don’t know how to show input text and only fill using scan code not enter manually. But I will test. Thx again.
open a column for scanned code, when user will scan the code it will go there.
add component text entry, assign it to that column … users can insert manually
I solved temporaly using template, replace spaces, dots, with nothing. but I still need to check/aprove to save only is the first digit of this code starts with “8” otherwise I cant accept to continue.
If I’m understanding correctly, you want to check if the first digit is an ‘8’? To do that, I would first create a template column that joins ‘@’ to the code. Then create an IF column that checks if that template includes ‘@8’. If it does, then it’s true that the first digit is an ‘8’.
To validate the number length (always =48), you need to use a text column first (Glide will check it and notify an error message if length isn’t 48).
Later and internally, you can convert that text input to a number.
If it’s a number, you should be able to count the the number of digits after the fact with some math.
You can see an example below. The only difference is that since you already have numbers, there shouldn’t be a need to convert to all 1’s to make it work. I’m not sure though if such a large number would calculate properly, so no guarantee that it would work. This is of course if you need a count after the data has been input and saved to the table. If you need it in a form, then @gvalero’s idea is probably better.