Jump to content

ken_s2007

Members
  • Posts

    125
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

FileMaker Experience

  • Skill Level
    Intermediate
  • Application
    16 Advanced

Platform Environment

  • OS Platform
    Mac
  • OS Version
    High Sierra

Claris Partner

  • Certification
    Not Certified

ken_s2007's Achievements

Collaborator

Collaborator (7/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

1

Community Answers

  1. You are correct about what I'm after. I overlooked the fact that Set Field[] uses the currently selected field (when no field is specified). This is so much cleaner. Thank you very much.
  2. That was my initial attempt, but when selecting "Specify target field", then clicking "Specify...", I did not see a way to programmatically set the field name. Good to know it works in v.18, thanks.
  3. What you wrote makes total sense in general, but it piqued my curiosity about this particular script step. Get ( ActiveFieldName ) returns the name of the field that has focus, and Get ( ActiveFieldContent ) returns the contents of the field that has the focus. My hunch is that when this script step completes execution, that no ID nor content is stored in relation to the script step. Thus (IMO) when this generic script is copied and pasted into another file, it should remain exactly as written, for consistency. If, however, data specific to the last execution of the script *is* stored 'behind the scenes' and attached to that script somehow, then I could see how that could change how script steps are formed when copied and pasted, although not for this particular script step. It appears that leaving the (specified) target field blank is simply shorthand for ( GetActiveFieldName ), and that the blank value in the target field should be honored after the script is copied and pasted, for consistency. Fortunately, there is no behavior change that I can see when using ( GetActiveFieldName ), so it is a somewhat minor point. But if there's more to it than that, I'd love to know. Thanks.
  4. macOS 10.13.6. FileMaker Pro Advanced 16.0.6.600. In a solution "A" on my computer, I created a script as follows, to remove any non (field) default formatting in effect on a selected field. I used this method: "If no field is specified and a field is selected in Browse mode or Find mode, that field is used." The script works as expected: Set Field By Name [ TextFormatRemove ( get ( ActiveFieldContents ) ) ] During testing, I've saved the script in solution "A", and even quit FileMaker and reopened the two solutions. When I copy the script and paste it into solution "B", the script changes, adding Get ( ActiveFieldName ) ; to the specified field (which has no value in "A"): Set Field By Name [ Get ( ActiveFieldName ) ; TextFormatRemove ( get ( ActiveFieldContents ) ) ] Is this expected behavior? Note: when I click Specify Target Field in "A", Get ( ActiveFieldName ) appears, so I'm thinking that when leaving that blank, as I did originally, that Get ( ActiveFieldName ) is actually in effect, even though it does not show up in the script step. (I *was* able to modify it to how it was written in "A" once in "B".)
  5. That looks very promising. I will check it out. Thanks!
  6. I'm not well versed in summary layout parts and reports, but am trying to learn. I have a (personal) database to track investments (stocks, mutual funds, bonds, etc.). I have fields such as: number of shares, price, and value (technically: shares * price). Each record has three checkboxes: buy, sell, and current holding (previous (historical) records do not have 'current' checked). After establishing a found set (of a particular investment), I have a script that constrains the found set to buys, sells, and current record(s) (plural, because the same investment could be held in multiple accounts). (All historical records (except buys and sells) are thus not in the found set.) I have a script, triggered on layout enter, that sorts by buy, sell, and current. (Buys and sells are executed trades.) I have a sub summary part, and in it, a summary field based on value. The layout displays the records sorted as I want, and the summary field displays the correct total for each of the three groupings of records. What I want is to get the value of each of those summary fields, so that I can do a calculation: (Sells + current holding) - buys = profit / loss. Of course using the single summary field doesn't work. I could run a script to find the buy records, set a variable based on the summary field value, find the sell records, set a variable on the summary field, and so on. Then have fields with those variables (plus a calculation field) in the trailing grand summary. I could also create separate fields for buy (shares, price, and value), sell, and current, but I'd prefer not to. I thought I'd ask, because I might be missing a simpler method. thanks
  7. UPDATE: A user claimed to have been clicking a checkbox, which has a script trigger to run a script. The script wasn't executing at times. I misdiagnosed the problem. Sorry for the trouble (I see no way to delete my post here). ORIGINAL POST: I have a database using external authentication (via Active Directory). FileMaker Server 17. Scripting using Get(AccountName) (using some logic ("if") based on an expectation of a particular AD account name, and other functionality) works fine in FileMaker Pro 16 Advanced (returning a value like "smith"; the user's AD account name), but lately, the script isn't executing as expected *at times*, when using WebDirect. I created a script to display the user's AccountName, and instead returning "smith", the WebDirect user's AccountName is in the form of: [WebDirect-DC288] [UPDATE: That was actually being returned by Get(UserName), not Get(AccountName).] ... which seems to be causing the problem. An explanation of why that is being returned would be much appreciated.
  8. You are correct; apologies for my testing error. Nonetheless, after I believe I've removed all fields from QuickFind that could possibly matter, when I use the form of subdomain.domain.com in QuickFind , I nonetheless get multiple found records in the form of server.subdomain.domain.com -- just not the particular record of interest.
  9. Seems odd to allow the EA account to open Security (it says full access is required), but not to re-auth to save changes. Another user of the system (with full access) can both open and save Security settings. For now, I'll continue to use the FileMaker File account. thanks
  10. CLIENT: macOS 10.13.6 FileMaker Pro Advanced 16.0.5.500 SERVER: Windows Server 2012 RS FileMaker Server v.17 I an external authentication account in the form of an AD account: "ken", FM group: "ken_group" [full access]. I also have a FileMaker File account "ken" with [full access], and it is lower in the authentication order. I am able to use the external account to get into Manage > Security (which requires full access), but when I try to save changes with that account, I'm asked to "Sign in with an account that has full access privileges", but when I enter those same credentials, I'm told: "The account name and password entered does not match those for any FileMaker account." This is true for all (a handful) of databases on the same server. Update: Someone (outside of this forum) suggested I not have the FileMaker File admin account name the same name as the AD user. I added a new FileMaker File account "kenlocadmin", gave it [full access], saved, went back in and deleted the "ken" account, saved, closed the file, reopened it, and tried again, but get the same results.
  11. Odd, but today when I enter into QuickFind in the form of: server.subdomain.domain.com , I get that result in the found set. (Note: only that one record is found; no other records ending in subdomain.domain.com or com are found (which is my desired result). The only change I made that I can think of was close and reopen the database.
  12. FileMaker Pro 16 Advanced (16.0.5.500), macOS 10.13.6. I have a field (text, indexed, not global) that is searchable" (green) in Quick find. When I enter a Quick find in the form of subdomain.domain.com , I get 16 found records, but a particular record (in the form of server.subdomain.domain.com ) is not in the found set. When I do a (regular) search on the field of interest (using subdomain.domain.com ), I get 16 found records, but again, does not inlcude the particular record of interest, in the form of server.subdomain.domain.com. (Note: there is another field that contains some records with subdomain.domain.com , so that accounts part of the difference in found records). When I enter a Quick find, or a regular find (in the field of interest), in the form of server.subdomain.domain.com , the record of interest is found. I've used copy and paste, so I'm not incorrectly typing information. Help reads: "If you type more than one word in the search box, FileMaker Pro searches for records that have all of the words you typed." but I'm not seeing that as a cause for server.subdomain.domain.com not working in Quick find. thanks
  13. I arrived at a solution that is working now. The problem I was trying to solve: I have a field containing a bar code number, and want to have a find executed against the data, but if the first two characters of the barcode were "AB", to strip those off before executing the find. The solution: Use a custom dialog box with user input to scan the barcode; store the results in a global field; run an If statement, and if the first two characters are "AB", set a variable to the value minus the left two characters; perform a find using that variable. --------- Following is what I tried before the working version. I'm leaving it here mainly because I'm still trying to understand more (in my general FileMaker knowledge) about PROBLEMs 1 & 2 (#3 has been solved by using the custom dialog with user input, etc.). But since I have a working solution, only have a look if interested. thanks I have a field containing a bar code number, and a button that runs a script to perform a find on that field, where the user scans the bar code, and the scanner returns the number plus a carriage return (I have the scanner programmed that way) to execute the find. When there is a record with a bar code label whose number below the bar code itself matches (e.g., "20154673"), the following script works just fine. Enter Find Mode [ Pause: Off ] Go to Field [ Select/Perform ; hardware::id_num_org ] # At this point, the bar code is scanned, and the CR # triggers the find. However there are some barcodes begin with "AB" which are not to be used in the records (business rules). When using "Enter Find Mode [Pause: Off ], "Go to Field [ Select/Perform ... " is then executed before the barcode is entered; if pause is On, the user has to manually select the field to enter in (unless there was an active record, and the target field was active) -PROBLEM 1. If a record is not found due to the leading "AB", the "No records match this criteria" dialog is suppressed (as I want with error capture on), but the error code returns "0", not "401"—UNLESS I use "Perform Find [ Restore ]" with the criteria being data beginning with "AB", but of course the data being searched on is derived from the barcode scan. -PROBLEM 2. (Note: I simplified debugging of the error code by temporarily commenting out the If structure, and placing a custom dialog at the end of the script, using "Get Get ( LastError )" ) . Once I can (hopefully) get into the If structure OK, how can I modify the data that was input during the search? I have the code for "Set Field" (or similar) worked out, but don't know how to capture the input data into a variable, or what have you. -PROBLEM 3. Following are the basics of the script so far: Set Error Capture [ On ] Enter Find Mode [ Pause: Off ] Go to Field [ Select/Perform ; hardware::id_num_org ] If [ Get ( LastError ) = 401 ] # I only want to run the steps inside the following # If statement if the scan begins with "AB"; # not if there simply is no record for the barcode. If [ Left ( hardware::id_num_org ; 2 ) = "AB" Modify Last Find # I think in order to not require the user to # rescan if we get to this If statement, that I may # need to capture the scanned input into a variable. # That is yet another thing to work out. Set Field [ hardware::id_num_org ; Right ( hardware::id_num_org ; Length ( hardware::id_num_org ) - 2 ) ] End If End If Set Error Capture [ Off ] I tried using Perform Find [ ] , but didn't see a way to pass the scanned barcode using criteria for "Specify Find Requests".
  14. It appears I cannot force a line break in a Category Label of a pie chart using the pilcrow "¶". I just wanted to confirm that, or perhaps find out I'm doing something wrong. I've only included one of the case conditions here, for brevity. The label otherwise is performing as expected. thanks Case ( investments::asset_type_all_weather = "bonds_intermed_US" ; "bonds, US, intermediate term (7-10 year) | TARGET: 15%." & "Target = $" & Truncate ( .15 * $$total_value_g ; 0 ) & ¶ & "Actual vs. target $" & Truncate (investments::asset_type_allocated_vs_actual_US_bonds_int ; 0 ) ; )
  15. A Quick Find criteria of C02LPLV5F5N7 was getting a hit of a (numeric-type) field value of: H002557. A second pair of eyes noted that if you remove letters in the criteria, there was a string of 02557, which matched part of the field's value. The field should have been converted to a text field (after the inclusion of a letter (H) at the beginning of a serial number used in a key field), and more so, that field should not have been included in Quick Find results. Problem(s) solved.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.