FileMaker: Allow the user to filter the table and then revert back to showing all records - filemaker

I've just started using FileMaker Pro. I have created a spreadsheet in Excel which I'm basically trying to recreate in FileMaker.
I have my table (or, Portal) set up with data. Above the table I have 3 drop down fields, which pull their values from the table below. Based off of the value of the drop down fields, I want a GO button that will filer all of the table items to match what is in the 3 drop downs.
Image the table contains Car, Colour, Year. If the user selects Mercedes, Red, 1980 from the 3 drop down fields, I want the table to only show results that match those fields.
Ideally I'd like a button to trigger this action, and another button that resets it so it shows all results.
I can see that you can filter the table when you double click it, but this seems to set it to permanently filter. I want a button to do it basically.
Would appreciate the help! Thanks

Related

Updating a view column in Postgresql

So, I have a database of customers information ranging from phone numbers to names and even location.
I created a view of only the active customers and included an extra blank column where we can indicate if the customer has made purchase or not.
The issue now is, i keep getting an error: cannot update column "buy" of view
I tried entering a value in the blank column created.
Please how can I update a blank column in view
If you have a view column defined like
NULL::text AS viewvol
or
''::text AS viewcol
you cannot insert values into that column, nor can you update it. Data modifications on a view are translated to data modifications on the base table, and that only works for view columns that are defined using table columns.
What you can and should do is to create an INSTEAD OF UPDATE trigger for the view that performs the desired operation on the base table.

Copying records from one table and to another based on the value of a yes/no field

I'm beginner in MS Access and I have managed to make my own database for customers who sign up for soccer academy. Now what I want to learn is how to make a macro to do the following action:
"If a Yes/No field in Table1 is equal to 'Yes' then copy the record from Table1 and paste it to Table2"
I signed up a lot of new players because I gave them 1st day free and not all of them continue after that. What I want from this system is if that new player pays, I want him in a separate table to further calculate financial stuff.
I have made a form to sign up players and two tables, one for newly registered and one for those who continue with us and paid.
What you're going to want to do is create an Append query. You can do this by following these steps:
Click on Create, then Query Design from the ribbon on top
Select Table1 from the Show Table popup, and click "Add"
Click "Close" from the Show Table popup
Highlight all your fields, then click-n-drag them into the grid at the bottom
In your Yes/No field, set the Criteria to Yes
Click "Design" from the ribbon on top and choose Append
Set the Append To Table Name to be Table2
Save the query
Then, just set up a macro to run the query you've just created.
Without specific information, that's the best I can do. But it's definitely the easiest way to go. You can write VBA to do it, but that requires a bit more knowledge

SSRS cannot linked text box with field

I group my table by 3 attributes, and set page break on every group, and now i want to display that three attribute outside the table. I want to place them on the top of the report, and when i type the expression and i go in run view it's display only the first value, when i go to the next page nothing change
I tried to drag field from table, from data set, and nothing working.
In expression i type
=Fields!My_Field.Value.
Also if some of that three attributes i placed in table it normally displays values, but when i try to move it somewhere it stops displaying.
The issue is that a table is associated with a dataset but a text box is not.
You can reference a field from a text box using the Dataset field ( =Sum(Fields!AMOUNT.Value, "Dataset1") ) but you need to use an aggregate function like First, Last, or SUM.
It sounds like you don't want to use an aggregate since you are grouping by these fields, though.
display the three attribute outside the table
If your trying to display the current grouping in the table at the top of each page, add a new Row in your matrix above your header row and add your group fields there.

Filemaker 12 -- display one value, store another

I'm building a database in FileMaker 12 that will, among other things, keep a list of jobs (indicated by numeric ID) and the employees who had billable time for that job.
Given three tables:
Employee ( empName, empID, salary, ... )
JobHours ( empID, jobID, hrsWorked, ... , refID)
JobCost ( jobID, expenses, profit, ... , refID)
Where:
Employee is my personnel roster matching names to numeric employee IDs and stats (salary, et al) ;
JobHours is a list of employee participation -- whenever an employee spends time on a job, this table has a line that shows their ID, the job ID, hours worked, and a few other things;
JobCost is a daily record of jobs. One entry in this table refers to the activity for a single job on a single day. Additionally, each entry gets a system generated unique ID (since neither jobID nor date is unique) to relate to JobHours (resulting in a list of who worked on a particular job on a particular day).
I have a form showing records from JobCost. For each record, I can see in a portal, showing records from JobHours, who worked on that job on that day.
Now, the issue.
In my portal, I want to have a drop-down list of employee names pulled from a value list to create records in JobHours with the following criteria:
1) I need it to be a drop-down rather than a pop-up so it will respond to auto-fill from the keyboard. A drop-down will show the secondary value (employee name) from a value list while dropped down, and will respond properly to keyboard autocomplete on the secondary value, but once you've made your selection, it only displays the primary value (employee ID).
2) I need it to display names, not IDs, at all times. The pop-up does this perfectly. However, it doesn't seem to respond to the keyboard for typing autocompletes.
3) I need to store the numeric ID rather than the name.
I know how to satisfy any two of these criteria at once, but that's all. The whole database is working beautifully otherwise. Is this behavior possible?
One common technique is to use two fields, one directly on top of the other.
On the bottom, put your JobHours::EmpID field. Set it up as the drop-down list with the value list that you've specified.
On top of the JobHours::EmpID field put the related Employee::EmpName field. Set the field so that it cannot be entered in browse or find mode.
Now your users will see the Employee Name, but when they click that click will go through the top field and into the Employee ID field where they will choose the name from the value list.
pft's solution is one that I have long used, but I do still find it inelegant because the user still sees an existing id number in the field when changing the value.
If the type-ahead is important, I would use the popup menu. Once the menu has been activated either by tabbing into it or by clicking into it, the user is able to type from the keyboard and the selection will change based on what's entered.
I came to this thread looking for a solution to this same issue (allowing the user to pick from a list, show their choice, but store a related value instead). For example, choose a plant species name from a dropdown, show the plant species name in the dropdown field, but have it store the taxonomic serial number (TSN; which is more likely to stay the same over the years). This is easy to do in MS Access, but took a litlte more messing around to do it in FMP12.
How I solved it:
I created two fields in the table that would be storing the values: Plant_TSN and Plant_SciName. A relationship must exist between the values in these two fields. In my case, I store a SciName for each TSN in a lookup table. I then created two fields in my layout, one for each new field.
For the value you wish to store (ex. Plant_TSN):
Make the corresponding layout field a dropdown and include the show/hide arrow. Edit the value list you will populate the dropdown with to show the second (reader friendly) column but store the first column value. In the layout shrink the field to only show the arrow.
For the field you wish the user to see (ex. Plant_SciName):
make the other layout field a Edit Box and prevent field entry in either Browse or Find mode. But it up against the dropdown arrow created in the previous step to make what looks like one field.
Finally, back in the first field (arrow-only drop down) write a script to push the user friendly number (Plant_SciName) to the edit box when the user-ugly (Plant_TSN) value is picked in the drop down. I used the OnObjectSave script trigger of the dropdown formatted field. Script should be something along the lines of 1) Freeze window, 2) Go to Related Record (based on relationship in lookup table 3) Set Field (i.e. the edit box) and 4) GotoLayout[original] to offset the Freeze.
Probably not an entirely clear explanation, but I bet you will get it on your third read through! I would have posted a screenshot, but I apparently need 10 "reputation points".
Cheers.

Filemaker Pro 11 Script - Add fields dynamically?

So we use FMP11 to do inventory management. I do price updates to our products 3 times a week and it would be nice to store our past cost values into a separate table for historical pricing. I know how I would go about doing most of it, but is it possible to create a new field that is labeled as today's date on the fly? So my headers would be labeled with that days date and the old pricing value from my other fields would be inserted.
It is a bad idea to create new fields for the purpose you're describing. Create additional records instead, and do your report going from top to bottom instead of left to right.
That said, if you want to do it, you can using FileMaker Server Advanced with JDBC and the ALTER TABLE command.
Create an new table (e.g. ArchivePricing) to hold the values you want to reference at a later date (e.g. ChangeDate, Price, Item, ItemID, etc.).
Create a new field in the current table called z|newprice - use this to type in your new pricing (you might do this on a list layout so you can easily change a bunch of prices).
Create a button that triggers a script that:
creates a new record in the new ArchivePricing table and inserts the ItemID (thus creating a link to the original table) - this can be done using script parameters or setting a variable)... the script continues.
uses the "set field" script step to insert info to this new record in the ArchivePricing table.
uses the Get (CurrentDate) function to insert the date into the ChangeDate field (thus capturing the date the change was made).
Before the script finishes be sure to use "set field" back in the original table to move the value in z|newprice field into your normal Price field. Do this at the end of the script and then commit record.