0

Getting number from table

Hello and thank you in advance 

My Database has tables called

Unit Rentals 1

Unit Rentals 2

Unit Rentals 3

i can't extract the number from a table like you can using a substring in a field

any advice would help me a great deal Thank you

5 replies

null
    • Paul_Chappell
    • 2 yrs ago
    • Reported - view

    So.  You have 3 tables. What fields do you have? What are you trying to achieve with those fields? We need more information to go on.

      • Roger_Buckley
      • 2 yrs ago
      • Reported - view

      Paul Chappell 

      Hi Paul Thank you for your response 

      I have 70 tables starting at the name Unit 1 up to Unit 70 with fields in them Like size, Date Arrived, Colour, etc.

      I would like to know how to Extract the Number from my table Name

      Example: (Unit 23) only needs to show (23) or (Unit 49) Show (49)

      substring works on a field name but not on a table name

      Hope I've explained this properly. Thank You.

      • Paul_Chappell
      • 2 yrs ago
      • Reported - view

      Roger Buckley Hi Roger.  Ok.  So you have 70 rental units. And presumably each unit will have similar fields - Size, Colour, Date Arrived, etc.  You have created a separate table for each Unit.

      Is there a specific reason you have done it this way?

      Why not just have one table called "Unit Rentals" with fields "Size", "Colour", etc, and an additional numeric field called something like "Unit Number"? Then you can have as many units as you like and you will be able to identify each one by the Unit Number field.

      This is the traditional way of designing a database.  If you need to add new fields as you think of them you only do it once in the single table, and you can have as many Units as you need, all in the same table.

      • Roger_Buckley
      • 2 yrs ago
      • Reported - view

      Paul Chappell 

      Hi Paul

      I know that's the way to do it now

      but a few years ago I learned Ninox by trial and error

      Trying this and that until it worked 

      so a little re-designing is needed but for future reference

      is there a formula to extract the numerical value from a table name

      Once again thank you for your response and for taking the time with me.

      • Paul_Chappell
      • 2 yrs ago
      • Reported - view

      Roger Buckley I don't think there is a way of manipulating a table name. But why not just still simply have a field in each table called "Unit Number"?  Fill it with the number of the table, but do not make it writable. "writable if.." or "Display field only if.." set to false.

Content aside

  • Status Answered
  • 2 yrs agoLast active
  • 5Replies
  • 48Views
  • 2 Following