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

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

Related

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

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

If it's possible, is there an option or other way to change a "Sublist Field" column's display type within a transaction form in NetSuite?

I need to change two columns in a Sales Order's item line section (bottom of the page) in NetSuite: https://i.ibb.co/27vx9Dr/2019-06-20-10-41-13-Window.png
It feels like the solution ties these two together as they are both perceived as item line fields or "Sublist Fields" (according to NetSuite's customization form page).
INVENTORY DETAIL needs to be enabled or set to "normal" so I can be able to specify bins associated from my selected item or be able to interact and fill in this column at the basic level.
AMOUNT needs to be set as "inline-text" so that other people handling sales orders cannot disturb it at all and still be able to see the value of this particular column.
I have attempted to search through Customization > Lists, Records & Fields and searched the following options: (which I thought were relevant to the fields that I wanted to modify)
Item Fields to no success
Transaction Body Fields to no success
Transaction Line Fields found out that AMOUNT and INVENTORY DETAIL are both padlocked
I also attempted to search through Customization > Forms and I have spent a long time looking through my Sales Order custom transaction form (possibly missing out on menus unintentionally) to no success.
I know that inside Customization > Forms > Entry Forms there is an Inventory Detail form in there that shows exactly the window I'm expecting, but I haven't figured out how to customise anything in the columns item line for transaction forms yet so I can create a custom column containing a link to INVENTORY DETAIL simulating the typical behavior of the original one while hiding the disabled one.
Near the top of a Sales Order form, I went to Customise > Customise Form and found out that I can find both AMOUNT and INVENTORY DETAIL inside the Sublist Fields tab.
Unfortunately, it only has SHOW toggles and this does not do what I need for it to do.
It is clear that I am confusing Sublist Fields with Screen Fields where I expected there would typically be a DISPLAY TYPE column that bears the drop-down selections containing "Normal", "Inline-Text" and "Disabled" options.
In actuality, they have SHOW checkbox toggles for both INVENTORY DETAIL and AMOUNT where the AMOUNT checkbox is greyed out. (This still does not achieve or reflect what I need it to do)
I am unaware of the conditions that needs to be met for AMOUNT to behave as an inline-text. There is probably another condition that needs to be met for the INVENTORY DETAIL column to be made available somehow.
I admit that I missed something crucial, so please kindly mention about it.
Any help would be greatly appreciated.
I was able to create a new column by creating a Transaction Line Field that contains two separate fields which are applied to Sales Orders.
For the INVENTORY DETAIL, I went to Customization > Entry Forms and copied the link for "Standard Inventory Detail Form" and then produced my own HTML code inside the Default Value when creating a new Transaction Line Field.
For AMOUNT, I created a new transaction line field and then set the Default Value as the appropriate value found in https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2018_1/schema/record/billingaccount.html and I used the curly bracket notation {} to fetch the data for the edittable AMOUNT but changed the Access to View-only, which makes this exactly what I needed.
After previewing the changes into an existing Sales Order, I can see my results reflected as expected. Consider this question solved.

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.

In SSRS 2008, is there any way to add all dataset fields to a table at once?

I'm working with SSRS for the first time. When adding a table to a report, is there any way to add all fields of a dataset to it at once or does it have to be done individually? Drag & drop, insert column -> right is a pain when there are a lot of fields that are being displayed.
It's a bit of a workaround, but the "Add new report" wizard automatically creates a table with the specified columns and groups from your given dataset. I don't believe there's a way to trigger this functionality from within an existing report, but you could create a "sacrificial" report to get what you're looking for - run through the wizard, generate the table, and copy / paste it into your original report. As long as your datasets are the same, it should work just fine...
Hope this helps.
I have a similar problem as the op and am new to SSRS/BIDS. And, I am updating a previously created report which (for me) is too complex to just quickly re-create using the "wizard generation" as the datasource is a web service (with code-generated web service parameters, lots of calc'd datasource fields, etc). It is faster to just copy the .rdl, delete all, and create the table manually.
I thought I would add that (only a little better than op's method, but nonetheless it is time-saving) you can just drag and drop to populate columns w/o the "right click > insert column > right". Just drag the dataset field to the place you want it in the table and BIDS/SSRS will automatically insert a new column. It also helps to drag the latter columns first (i.e. always inserting a previous column) so you don't have to scroll to the right all the time.
I was looking for the similar thing and I have figured this out. Open your report in Report Builder 3.0 which is a free BI tool by Microsoft. Go to Insert > Table wizzard. Then just follow the wizard steps to generate auto columns. Save and reopen the file in your visual studio, file will refresh itself.
Ved
#Kevin Fisher actually there is no need a workaround. There is way to do this out of the box of Report Builder 3. Open your existing favorite report template. on the tool bar, click on INSERT tab, look for TABLE icon, click on the down-ward arrow at the bottom of the TABLE icon, then choose TABLE WIZARD. Then I guess you know what to do from here. -hope this help.
I agree that there is no way to bring all of the columns over from the data set to a table easily. But I came up with a method that helped me:
Insert a blank table (this usually gives you 3 columns). Then insert columns to the right of the table (right click, Insert Column, To the Right), as many times as you need in order for it to equal the number of columns in your data set.
Once you have all the blank columns created in your table, click inside a table cell box and use the drop-down to select the field. This has the added benefit of allowing you to get the fields in the correct order, since I've noticed that the field names in the dataset don't always appear in the same order as the SQL stored proc output.