I am relatively new to Filemaker so this may be easy for some of you. I am making an IT Ticketing System and I want every user not an Admin (so basically everyone will be a guest) to just see a new, blank record when they enter the database. I tried to script below but when I log into FM Web Direct, it doesn't work.
If [Get(AccountName)="Guest"]
Go To Layout [LayoutName]
New Record/Request
Show/Hide Menubar [Hide]
Show/Hide Toolbars [Hide]
End If
I set the script to run on OnFirstWindowOpen (I've also tried OnWindowOpen).
If you want to match the guest account, you need to include the brackets, like this: [Guest]
Related
Periodically, my database gets slow and I have to create a new database and import all my forms, etc. into the new database. For some reason, all my form control settings (Access Theme, etc.) gets lost and I have to manually go through every control on every form to reset it to the way I like it.
My question is:
Is there a way to keep all my form control properties and settings when I import them into the new database?
If not, how would I use VBA to do this for me automatically... looping through all the controls on all my forms to set all the properties to the way I like it? And, even more specific, I have a Sample Form with one of each control with all the properties set the way I want. So, how could I open this Sample Form and read each control's properties to copy to all the same controls on all my forms?
Performing a "Compact & Repair Database" action under the file tab will speed up your slow database. So you will not have to export and create a new instance of the database.
Microsoft does a good job of explaining
hope this helps
I Compact and Repair all the time.
I found the answer to my question: When I create a new database and import the forms from my old, slow, database, Access asks if I want to import the Themes along with the forms and, when I check this box, it copies all the forms' formatting, colors, etc. I think you have to click the Advanced button (or something like that) to see this option when you're in the Forms tab.
I've just started in FM 14. I have a client table and a project table. When I look at a client entry I have a portal that shows me the titles of the projects they have commissioned. I'd like to be able to click on one of the projects in that portal list and be taken to the layout that contains all of the other fields in that project record. Can this be done? Is this enough information?
Yes. Set the button action as a script step "Go to Related Record". In this script step, set the table as "projects" and select the layout you would like to go.
I would stay away from GoToRelatedRecord. I usually just grab the ID from the item in the portal, then search for that item on a new layout, then do whatever I planned on doing. It's safer. With GoToRelatedRecord you can never really control what happens.
G'day!
I'm using a command to bring up information from our main pay database. This part of the report is working just fine.
I'd like to be able to prompt the user to specify their datasource location using a parameter field, in case they'd like to be able to use one of their pay test databases. Kind of like prompting for a date, but being able to connect to a different database.
Is there a way to do this? I'd thought maybe creating a {?source} parameter field in the command, and beginning the command with USE {?source}, but it doesn't really feel right, or like it would work as I'm basically trying to change the current connection through code.
Thanks for your time!
This is possible but the moment when the report is started will be too late to set the datasource.
You can create some logic in your app to get the desired datasource and when the user starts the report you will set it
I've recently started using filemaker to create some contact databases. I played around with one of the templates and after having tweaked the template to a point where its got all the data I need on it, I've found that I messed some things up in the process.
All the things listed below seem to have been affected.
'View Contact List Report' no longer works
'View Address Labels' no longer works
(Both show a prompt saying "no matching records were found")
the avery label printer doesn't show anything more than the name of each record.
(NB: All of these were working fine with the standard untouched template)
I'm guessing that because I altered the names of the fields, their corresponding scripts, calculations are no longer valid..
Where do I go to fix these scripts/calculations/etc (i.e. replace old field names with new ones..) is there any way I can edit the current ones or have a shot myself in the foot?
It sounds like you deleted some fields. If you simply renamed fields then the scripts should still work, unless you changed the data around drastically (perhaps the script is doing a find on a field that should contain some specific type which is no longer set in the field...) Go to layout mode, find out what script the button is calling and then open the script and re-set any set field steps that are calling missing fields and you should be good to go.
FileMaker doesn't normally rely on names, so users are free to rename everything. It's possible to write code that does depend on names, but it must be an explicit decision and I'm not really sure they did this in templates.
But who knows; to check this figure out which scripts run these reports. To do this switch to the layout mode and double click the buttons (or right-click and select "Button" from the context menu). Open scripts, find the script there, and see if it does anything suspicious.
I have a data entry form that when it closes opens another form for further updating the just newly entered data. However, at times no further update is necessary. How can I suppress the 2nd form from opening when there is no need for further update? Presently the form opens even when there are no recordsets present. (need a similar Event like for the report "On No Data")
Have a bit field such as a checkbox with default set to true open second form. Uncheck it to avoid the system from opening the next form. You will need to handle this in your code and check if that check box is checked or not.
Of course we will need more details such as why you are currently opening this second form...in addition, cant you check if any changes were made and if they were then open that second form else dont? Also what lang ?
Without knowing more about what you're working on, I'd say you would have to modify the process that shuts down the first form to check if the second form is needed. In .NET, for example, you could add code to the OnClosing event for a WinForm to check. If it's needed, open it as normal, if not then don't.
Subject: Tool Kits. Tool Kits consist of 1 or more tools. If tools already exist, no need for 2nd form to pop up. If tools are new, I need to fill in one of the 3 fields in the drop down listing. I like the idea of adding code to the OnClosing event, but do not understand what you mean by WinForm.