Hi AT community
I once again appeal to you for assistance, please.
We are a performing arts company who provide entertainment for events. An event can book one or more performances which can be of the same type or different types. These types are important as the booking contract sent to the client (generated in AT + CraftMyPDF) includes technical requirements specific to the performance type.
In the case where there are multiple types of performances in the same event, there is a cascading order in which technical details should be selected.
Now, in our base we have all our performance offerings listed, along with their type (offerings table). These are pulled through to a booking record (in the bookings table), where 1 booking can have 1 or more performances.
Booking Contracts is another table which takes exactly the information needed to generate the PDF.
The piece of the puzzle I am attempting to solve is populating the Booking Contracts record with the correct technical requirements, based on conditional logic. Where there is just a single performance per booking, this is a simple lookup, but things get tricky where there are performances of different types in the same booking.
In these cases, I want to specify that if one of the types contains xx, then use set A, else if it doesn't contain xx, but does contain yy, use set B and if neither of those conditions match, use set C.
I initially had technical requirements at the performance level and linked those through, but for bookings with more than one performance, I would get the technical details for each performance.
I have since pulled them out into a reference table, linking through type to offerings, but I am stuck on where/how to implement the logic. It's worth noting I currently only have scripting extension available, not automation scripting.
(A secondary issue here is that the original field is rich text, and is well formatted, but pulling that data through to other tables loses all formatting which seems to really defeat the point. If there are any points around this, it would also be greatly appreciated!)
I've also wondered whether I could perhaps expose the field in an interface, but allow users to edit/reformat - but unsure whether that is feasible.