Help with table setup and expressions

Hello,

 

I'm very new to Appsheet. Just started last week with no experience in coding, hence why I chose Appsheet. I am a out of home advertising broker. Basically any medium for advertising you find in the street. Bus shelter kiosks, bulletins, digital bulletins, etc. I source my inventory from a bunch of different vendors. The main product type is the bulletin type.

 

Here's one of my issues, any given bulletin usually has 2 sides, front and back. The way that I build the product Id (which is not the key column btw, can't remember why but I was having some issues and decided to create a uniqueid col) is basically concatenating several columns. 3 letter abbreviation of city - number identifying the type of medium - a sequential number auto generated every time I enter a new row and lastly A or B at the end, a for front side and B for backside. The sequential number I generate is just a counter for every new row for every city. Basically every city has its own sequential counter running.

dancira_3-1707179617372.png

 

Row 1 and 2 are basically the same location, but since they can be rented individually, they have to be separate. The way that I was doing it in google sheets before I started with Appsheet was to just have a new sequential number for every row and avoid having any issues, but this relational databases are so powerful there must be a simple way to fix this. So, ideally, I would like row 2 to have the same exact Site Number as row 1 except change the last letter to B. Site 1: Row 1:A and Row2:B. I want this to be done as automated as possible to look like this:

dancira_4-1707179691423.png

In this table you can see that each site pair shares the same  Site Number except for that last character which changes depending on the side. Additionally in the Site_detail view. I would love to be able to look at that counter side value and be able to jump to that rows Site_detail view. 

Up until now I have been able to create an action to duplicate a row, change the necessary values and not increase the counter, but I have to create the new record and then once its saved I have to click on the action to duplicate. I'm sure there must be a way to simplify this process but I've searched here in the community and chatgpt probably hates me now and haven't been able to find a simpler solution. 

I hope that I was able to explain myself, my lack of knowledge of the terminology has me at a bit of a disadvantage when trying to search for answers. 

 Thanks for any help!!

 

 

 

 

 

0 1 26
1 REPLY 1

first of all, [site number] could be an ID, it would generate an error if another site was created with the same id.
Then, you need to calculate your sequential number. Something like

MAXROW("your sheet", "sequential", and ([City] < [_THISROW].[City], [Type] < [_THISROW].[Type])) +1

Top Labels in this Space