By Scott Pon
Environment: FM13 with FM13 Server, mix of Windows 7 and 10.
Is there a way to set a script trigger on if this portal row is new? IE, a script to run if this new child/portal record is new.
We have a parent record, and portal to Children records. The children records have 2 fields: Profile Name and Process type. Our user would like to enter a new child record (profile name and process type). if the process type already exists, we will need to archive the existing record (matching the profile type). There is more bI want to start with this first.
I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals. Any ideas on how to handle this? Or am I going to have to add a button to go to another screen to accomplish this?
Thanks. I hope i gave enough info for you to help me.
I am currently working on a database, which HR-Managers can access via WebDirect using login-information, to accede or resign their employees.
I have made 6 possible option types for the HR-employees to enter data into, set by an unique ID, but with the use of the same fields.
X fields with option type 1 (Accede)
Y fields with option type 2 (Resign)
Z fields with option type 3 (Maternity leave / leave)
.. Etc. 6 option types in total.
Now, based on my project description, a couple of the fields will have to be validated / not empty, which the HR-manager is prompted to enter before the record can be committed.
Now, I am aware of FileMaker has it's own Field Validation, but I think the built in feature is bonkers..... (Sorry FileMaker..)
Therefore I was thinking of making a script to each of the different fields, which needs validation, and is this even a good solution
Question one; how do I do this, the most easily? Is it possible?
I have 8 required fields for validation, fields are global.
Fields such as; Company Name, HR-manager name, HR-manager e-mail, employee SSN, employee name, employee surname etc.
I don't want the scripts to interfere with the other option types ( X, Y, Z ) which each is set by an unique ID, as well as fields, although the fields used in these option types are from the same table.
Please see attached images of my setup.
Hope you can help me, for the best possible solution.
If you need more information, let me know.
P.S. The language/text on the layout is Danish, although shouldn't be considered an issue for understanding my problem.
By Dana G
Purpose: To capture the contents of a field before it is changed. Compare the before to the after. Highlight the after and screen capture then export.
I can't get past the first sentence and it's getting frustrating because it seems extremely simple.
1 Field: OnDeck_t (text) - The OnDeck_t field data = On
2 Field: OnDeck_before (Where I want to capture the OnDeck_t before it's changed)
I have an OnObjectEnter script trigger on the OnDeck_t field that runs this script:
Set Field By Name [substitute (Get (ActiveFieldName); "_t"; "_Before"); Get (ActiveFieldContents)]
If I do this it works fine. (But I don't want it hard coded. I will be using it for all the fields on the layout):
Set Field [OnDeck_before; Get (ActiveFieldContents)]
I have divided the Substitute (Get (ActiveFieldName); "_t"; "_Before") and Get (ActiveFieldContents) into separate lines in Data Viewer and both return expected results. Why doesn't it work when it's part of a 'Set Field by Name' script step?
I'm new to the forum so apologies if I have put this question in the wrong section.
What I am attempting to do: I want to create a 'home page' that each consultant sees when the database opens on an iPad. The home page should have two pop-up menus, Client and the other Contact. For context, each Client with have multiple Contacts (generally employees and contractors) The consultants in the office want to be able to navigate to a Client they select from the pop-up menu on the 'home page'. The same process applies to the Contact pop-up menu.
Many thanks if anyone has ideas how to achieve this.
I have a global field that is acting as a search bar to perform a find with the data stored in it. I have set an OnObjectKeystroke script trigger to the field to activate a script if the user presses the enter key while inside the field. Since most users are used to hitting enter on their keyboards to perform a search and it's much quicker, I've adopted this method as opposed to a search button.
I would like to prompt the user with a warning dialog if they press enter while inside the search field, but happen to leave the field empty. The custom dialog would tell them to type some search criteria in, instead of leaving the field empty to avoid performing a blank search.
So far most of the script I came up with works, but for some reason it gets stuck in a loop during the last simple steps and I can't get out of it.
I'm trying to have the following occur:
- Exit the search field, and make it lose the focus.
- Show a custom dialog telling the user of the error and prompting them to press "OK".
- Upon pressing OK, enter the search field again and bring it into focus to set the cursor in the field so that the user can retype a correct value.
The default FileMaker field validation that is found in the field's Options settings performs something very similar to what I described above. I'm trying to achieve a similar effect, but using a script instead to have more custom control and flexibility with the warning dialogs.
Any help much appreciated.
Custom validation - Search field.fmp12.zip
Who Viewed the Topic1 member has viewed this topic:hutchlad