i want a shapefile table to be autofilled,for example each new point i place has an attribute column that auto fills its self a set of repeated numbers such as (1,2,3,4,1,2,3,4,1,...etc)

and another column to have a string and numbers and the numbers would increase (a1a1,a1a2,a1a3,a1a4,a1a2,a2a2,...etc) and so on, and if one value gets deleted i can relace it without the entire data shifting

Is there a function for those things?

  • 1
    Welcome to GIS:SE @AbdullahAlaa! Your first part can be solved using the expression ($rownum - 1) % 4 + 1. Your second part though, is a1a1,a1a2,a1a3,a1a4 supposed to repeat? Just noticed that you also included a1a2,a2a2, is a2a2 a mistake? – Joseph Apr 10 '17 at 11:36
  • Thank you for the $rowrun function as for the second part it is meant to repeat and increase (a1a1,a1a2,a1a3,a1a4,a2a1,a2a2,a2a3.a2a4.a3a1.a3a2.a3a3.a3a4 and so) also is there a function to change a string so that not only span the numbers from 1-4 but also the letters from a-z – Abdullah Alaa Apr 10 '17 at 18:01
  • also is there a way to update the data those functions created automatically – Abdullah Alaa Apr 10 '17 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.