Generating the reference number for Incoming or Outgoing transactions

I attempted to modify the Content Management system by adding fields such as Incoming, Outgoing, and Reference Number.

Additionally, I created another table called 'Utility' and established a relationship with the Content Management system. However, this integration is not functioning consistently. The primary issue is that the Reference Number field is not displaying the expected values.

Utility Table:

Script:

Solution :smile: