Complete newbie to Filemaker here so please bare with me while I try to explain this as best as I can
I am working on an 'event log' for a security company. Basically entries are made during the day of tasks performed, so we have a bunch of categories in a dropdown list, date and time stamps, who made the entry, etc. etc.
When some categories are chosen from the dropdown list, we need extra information entered, so I have a couple of hidden fields that pop-up when those categories are entered to allow people to enter the extra required data without cluttering the interface when that information isn't required.
One of the main entry fields is just the 'description' field where the user types whatever it is happened at the time.
When a category that requires extra info is chosen and the extra data entry fields pop-up, I would like the main description box to auto fill with the information from the extra fields as well as some extra text (so the 'description' makes sense) rather than the user needing to type the information in twice.
I have a (basic) script setup to do that at the moment along with a script trigger on one of the extra fields.
I have been unable to figure out the syntax required to achieve the end result so was wondering:
- Is this actually possible?
- If so, what is the correct syntax to use to bring the field data in with the extra text?
Basic Script: (Note that I also have local variables set in the script but I didn't worry about including them here - you can see where they would be inserted)
If [Security Log::Category = "Temp Vehicle Pass Issued"] Insert Text [Select; Security Log::Entry Description; "Temporary Vehicle Pass issued to $TVPNAME ($TVPCOMPANY, ID: $TVPID), Rego: $TVPREGO" End If
So there is a mix of text and fields to be inserted as follows:
Temporary Vehicle Pass issued to [$TVPNAME] ([$TVPCOMPANY], ID: [$TVPID]), Rego: [$TVPREGO]
So far, everything is working as I would expect as in the text is inserted to the description field exactly as typed above when the script is triggered, but I can't figure out how to get the user entered data in place of the variables. I have tried it without using variables and just using the field names (e.g. Security Log::TVP Name) but had no luck there either. I decided to use variables just so it was easier to read/type.
Hope that all made sense... What am I missing? No doubt it is something painfully obvious