Zero fill function in text expression column

Welcome to our Forums Technical Support Support Desk Zero fill function in text expression column

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5536
    kourosh kalayeh
    Participant

      Hi,

      I was wondering how I can set format of numbers in Text Expression column.  Here is an example;

      I want to create a column which contains “Image01”, “Image02”, … (Image with numbers zero filled).  Using Text Expression column I can get “Image1”, “Image2” (i.e., without zeros), is there anyway that I can change the format of the number used in the text expression?  Basically, I am looking for a function like zfill in Python.

      Thanks,
      Kourosh

      #5582
      dgteam
      Moderator

        We don’t have a function that allows you to do this dynamically, but in a couple of steps, the number can be combined with the string to get very close.

        By adding a fixed value to the numbers, we get a number that has the zero in the right place.  That is combined with the text “Image”.  The column Combine was copied and converted to a text column, that can be fixed using Data > Find and Replace.

        paste1

        Here is what the Find and Replace interface looks like.

        paste2

        So if you did not have to do this too often this is not that many steps. If this is something you have to do all the time this might become tedious. Let us know how big of a need this is for you.

         

         

        #5584
        kourosh kalayeh
        Participant

          Hi,

          Thank you for the response.  As mentioned the proposed method is a little bit tedious and not very methodical.  I use python to add a new column to my data and  import the modified data into DataGraph.  So it is not a big deal, but it would be nice to have this functionality .

          Thanks,
          Kourosh

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.

        Welcome to our Forums Technical Support Support Desk Zero fill function in text expression column