Dear community,
I have two attributes:
1) gebnr (this is the number of the studied field, le.g. 1 or 135...)
2) ID (this is the number of the studied field filled up to four digits, e.g. 1 -> 0001 or 135 -> 0135...)
I'd like to automatize the filling of the ID-attribute. I've tried to code a attribute rule, that says if
- gebnr < 10 then ID=000gebnr
- gebnr >=10 and gebnr<100 then ID=00gebnr
- gebnr>=100 and gebnr<1000 then ID=0gebnr
- gebnr>=1000 then ID=gebnr
My coding for ID looks like this now but it doesn't work (I have no experience in arcade at all):
var gebnr = $feature.GEBNRA
var ranking = When(gebnr < 10, Concatenate(000,gebnr), gebnr >=10 && gebnr < 100, Concatenate(00,gebnr), gebnr >= 100 && gebnr < 1000, Concatenate(0,gebnr), gebnr >= 1000, gebnr,-1);
Any ideas?
(Please, don't ask why these redundant attributes are necessary, it's German bureaucracy 😄 )