
Spac3man
Members-
Posts
36 -
Joined
-
Last visited
Everything posted by Spac3man
-
so is there a way to renumber the internal ID?
-
Custom Dialog Window Syntax
Spac3man replied to Spac3man's topic in Script Workspace and Script Triggers
Fantastic..... thanks -
What is the correct syntax to include a field inside of the custom dialog? This is what I tried: "Are you sure you want to delete Invoice:"; Invoice::INV_Num FMP keeps telling me it expects and operator so I tried: "Are you sure you want to delete Invoice:" and Invoice::INV_Num but the resulting window would just show 0
-
After a lot of Googling, that is the conclusion I came up with too. I have too many scripts pointing to this layout so instead I grouped everything on the old layout, dragged it off-screen and copy/paste everything from the new layout into the old layout.
-
I have designed a new layout in my DB and want to replace the old one with the new one. The problem I'm having is that every time I try to rename the old layout, all the scripts that referenece the old layout, change to the (old layout) new name. And then when I rename the new layout to the old name, the scripts still reference the old layout with new name. IE.. script01 ---> Welcome Layout (rename old layout) Welcome LayoutOLD script01 --> Welcome LayoutOLD (rename new layout) Welcome Layout script01 --> Welcome LayoutOLD So the script will never call the new layout. Last time I designed was in FM3. So please forgive me if it is obvious. Is there a way to change the layout number instead?
-
Importing File as Table AND replacing existing relationship
Spac3man replied to Spac3man's topic in Relationships
Thanks for the info Wim. This was originally designed in FM3. I'm gonna let sleeping dogs lie this time. -
Importing File as Table AND replacing existing relationship
Spac3man posted a topic in Relationships
Hello All! I have a DB that has several files. Each of these files has only one table. For the sake of good design ( I'm fairly new to FM but not to DB design concept) I want to import each file into the main File as a table but not lose the relationships. What I have tried is to FILE/IMPORT RECORDS/FILE as table and join the new table to the appropriate keys in the Relationshp diagram. The problem is that the fields in the corresponding layouts still point to the original file. If I delete the original file and rename the newly imported table to the original file name, the links are still broken. Is the only way to accomplish the end result to re-link all fields in all layouts? If so, I'll chalk it up to bad design and leave it as is. Any info is appreciated. SPace.... out -
Is there a way to control the original window? When you open a file, you cannot specify what kind of window opens (FMP12) nor the controls.
-
Hello, I am redoing a DB that was made in FM3. I am trying to determine what scripts are actually being used in the table and which ones are extraneous. Is there a report to that would tell me this? I've tried the database design report in FMPA12. It lists all the scripts but doesn't tell me if they are used. Any info is appreciated. space.... out EDIT: I found it in the report I mentioned above. For those that are looking for the very same this I was, create this report for the scripts. In this report, there is a field that says "Layouts that use this script" Ta Da!
-
I've manage to answer my own question but now have a new one. What I have discovered is the following: I assigned a menu set by privilege as mentioned above. I also chose to Hide/lock the status bar on file opening. When you hide AND lock the bar, you cannot use the Go to Record Menu with /Next/Previous submenu. If you hide, but don't lock it, then it is accessible. So the new question is.... Why would they do this, and how do I get around this issue. Off I go detective.....ing again! ugh
-
Does limiting an account to data entry also affect this issue? I have the "Go to Record Menu with /Next/Previous submenu in my custom menu. I apply the custom menu to the account at the opening of the file by script with Get(accountname) and Install menu set. The options are there but greyed out and I cannot scroll. What have I done wrong?
-
How do I get the most recently created record?
Spac3man replied to Spac3man's topic in Script Workspace and Script Triggers
That is a great way to validate. I would never have arrived at such a simple method. I could not, however, get your Custom dialog box to work. It's like it was stuck in a loop. If I entered info into the diag box and then tried to leave the unique field, it falsely found an existing record. I'll keep trying to figure it out, but thanks so much. I hope other newbs benefit from it too -
How do I get the most recently created record?
Spac3man replied to Spac3man's topic in Script Workspace and Script Triggers
I guess that's why they pay you the big bucks! Is this an efficient way to validate? Commit Records [skip data validation; No Dialog] Show All Records Sort Records [No dialog] (timestamp;decending) Go to Record [First] Set Variable[$PartNumCheck; Value:Products::Part Number] Go to Record [Next] Loop If[$PartNumCheck = Products::Part Number] Show Custom Dialog ["blah blah blah... back to order form"] Go to Record [No dialog; Products::Part Number = $PartNumCheck] Delete Record [No dialog] Close Window Exit Script [] End If Go to Record [Next; Exit after last] End Loop The Custom dialog box is purpose for avoiding FM validation. -
Hello, In a script, I am trying to set a local variable as one of the fields of the most recently created record. What script step will get me the most recent record? Every record has a timestamp create field but I don't seem to find any appropriate script step that will get this done. Could it be as simple as: :Show All Records :Sort Records (Decending by timestamp) :Go to record [First] :Set Variable [$local; Value:Appropriate field]
-
Hello All, I am developing a small DB for a re-seller of commercial products. Customers call the User to order products, the User enters an invoice in the DB and then orders the products from the Manufacturer. (No inventory is kept on-hand, either physically or in the DB) The User receives the products from the Manufacturer weekly but with some items backordered. I've already handled subtracting the B/O items on the original invoice. When the B/O items finally arrive, how do I script an invoice maintaining the Orders::_PK that is already half billed/paid? My first thought is to create a B/O Table using ORDERS::_PK and Order_Line_Items::Backorder to create a new Invoice that mimics the original. But then what would happen if, say, the User has 5 Widget01's B/O'd and only 3 arrive...... ? I may have bit off more than I can chew here! Any suggestions are appreciated.
-
Are you asking from a 'user' standpoint, or a developer?
-
so in the end, I took out the second relationship between the 2 tables and everything still works find, in fact better as I can now change the Campaign in orders without affecting anything else.
-
The price is input by the user at the time of order entry. I know it could come from the 'products' table but the prices change on every campaign. So instead of changing the price in the products table for every Campaign, I chose to allow the user to input the price In the end, the ability to change Campaigns on an order is mostly for entry error possibilities. Yes, the prices of products of an existing Customer order can change right up to the time of delivery based on discounts given by the supplying company.
-
Sorry, I thought this was rhetorical... the info, should be recorded in Order_Line_Items. Items should become associated with the new campaign.
-
So, if I understand... Orders have _fkCampaignID AND Order_Line_Items have _fkOrderID so each Widget sold thru relationship has a Campaign associated with it. Then, if I need to edit the order, the Campaign is changed only in the Order table.
-
'Widget01' is sold for $9.95 during Campaign 22. During Campaign 24, 'Widget01' is now sold for $11.45. If I don't record the Campaign with each Line_Item, how can I differentiate the Campaigns? Keep in mind I'm a newb and will do what u ask!
-
Because a product is not only purchased based on an order but also on a Sales Campaign. Specifics of a product can change from Campaign to Campaign. Is this a 'no-no'?
-
If a user wanted to edit an 'order' and change a field that was part of a relationship definition, how can I get the _fk_ID to repopulate in the related table? SPECIFICALLY: if order 'ORD2010126' is later edited in the Orders layout and the Orders:_FKCampaignID is changed to 'CAMP00020', how do I get the Order_Line_Items::_FKCampaignID for order 'ORD2010126 to update for all the relevant records in Table Orders_Line_Items? I tried an 'UPDATE' script with Set Field, but I guess I don't understand it well enough to make it work. I've attached an image of my relationships.
-
yup, the first suggestion did the trick. Funny how, as a newbie, it's easy to overthink things. Thanks comment
-
I am trying to create a field that counts how many orders a customer has placed. As a report, it's easy: Find CustomerID and sub-summary count OrderID. But can I get a FIELD to accomplish this?