How to insert the same Unique ID into two or more rows related columns?

I need to insert the same unique ID into the appropriate field in two different rows. I tried to solve the situation using Behaviour->Actions-> Data: set the values of some columns and this row, but it generates a different UID for each row related field. Thatโ€™s why I used the command in Expression Assistant: CONCATENATE (โ€œAEROTOWโ€, TEXT (DATETIME (UTCNOW ()), HHMMSS)), but sometimes it generates a different value by a second.
Does anyone knows easy way how to solve this?

1 4 934
4 REPLIES 4

Steve
Platinum 4
Platinum 4

How are the two rows related? Can one row identify the other?

I am trying to build an application for aeroclubโ€™s flights. We need to record start, landing, a pilot in command etc. But sometimes one aeroplane is towing the other (glider) and I need to identify these two flights with a unique identifier. So I do not see how can one row identify the other. Hopefully, I answer your question.
I am considering creating a dedicated table in which I will keep records for these joint flights. In this table, I will then generate an UID, which I will use for filling in both rows.
Of course, it would be better if there is some way to generate a UID first and then using it for both records.

Based on my limited understanding, you could add a column named (e.g.) TowPlane of type Ref. When the user adds the gliderโ€™s flight, they would also select the tow planeโ€™s flight.

Since this is the only case where you are doing this โ€œtwo planeโ€ thing, I think you could create a second column field that shows just if there was a glider, and also another one as Y/N

IE:
Field 1: โ€œIs there a glider?โ€ Y/N
Field 2: โ€œSelect glider:โ€ Ref (Show_if [Field 1])

I donโ€™t know if Iโ€™m breaking any DB normalization rule but there you have it.

If instead you need to add two or more at once, you could do it with enumlist base type ref.
Check this topic:

Top Labels in this Space