Jump to content

comment

Members
  • Content Count

    28,144
  • Joined

  • Last visited

  • Days Won

    580

comment last won the day on November 10

comment had the most liked content!

Community Reputation

1,428 Excellent

About comment

  • Rank
    consultant

Profile Information

  • Gender
    Not Telling

Platform Environment

  • OS Platform
    Mac
  • OS Version
    x

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. comment

    Record navigation

    A footnote: don't use global $$variables, unless you need them to persist after the script has run out. In this example, a local $variable would be quite sufficient, and it would be cleared automatically when the script ends.
  2. comment

    Parsing a compound name

    If there's always an " and " separating the names, then do a PatternCount() for it. Make sure to include the surrounding spaces to avoid false positives with names like Brandon.
  3. comment

    Parsing a compound name

    I am afraid these examples are not sufficient to determine what rules your data follows. I am guessing that "Smith-Jones, Adam" would also fail your test. The question is: what is unique to an entry of two (or more?) people? Will they always have the same last name? Will there always be an " and " separating their first names?
  4. comment

    Date calc error

    If you want to use the given input as a date (or as a timestamp) then this is not a question about formatting. You need to take the text input, convert it to date and store it in another field - either a calculation field returning a date result, or a date field. The result will then be displayed in the date format used by your file - or in another format you chose for the field in Layout mode. The conversion itself is rather trivial: Let ( [ y = Left ( Input ; 4 ) ; m = Middle ( Input ; 6 ; 2 ) ; d = Middle ( Input ; 9 ; 2 ) ] ; Date ( m ; d ; y ) )
  5. I am sorry to say this, but this is getting ridiculous. You have no action specified for when the If[] condition returns true (it should be Omit Record). I said before that you need to pay more attention to detail. You have a perfect example given to you in the help, yet you can't follow it. I will not continue playing this game.
  6. comment

    Drawing in Web Viewer

    I suspect you are confusing variables with placeholders. Use placeholders in your code in places where you want insert values taken from the fields in the Filemaker record. The placeholder strings can be anything, as long as they are unique. I used "$placeholderA" in my example, but it could just as well be "###WIDTH###" or "@Length" or whatever. And again, make sure you are replacing values, not variable names. If your Javascript defines: var row = 10; and the value 10 should come from a Filemaker field, then you should write it as (for example): var row = %row%; This way, if the Row field contains 15 and you do: Substitute ( Table::HTML ; "%row%" ; Table::Row ) you will end up with: var row = 15; as the code executed by your web viewer.
  7. You have to be more meticulous with your coding. You have: Go to Record/Request/Page [ First ] inside the loop, where the example script has: Go to Record/Request/Page [ Next ; Exit after last: On ] so of course the loop never exits. Also, you are omitting the empty records, not deleting them. If you want to delete them, then - after the loop has terminated - switch to Show Omitted Only[] and do Delete All Records[]. Or delete them in the first place while still inside the loop. What you have now will delete one record - and that record is not empty (or it would have been omitted).
  8. comment

    Drawing in Web Viewer

    I can tell you how I usually do this. I start with something like the following code in the web viewer: "data:text/html," & Substitute ( Table::HTML ; [ "$placeholderA" ; Table::SomeField ] ; [ "$placeholderB" ; Table::AnotherField ] ; [ "$placeholderC" ; Table::ThirdField ] ) Then I work on the HTML code in the HTML field, until I get it functioning the way I want. Once that is done, I open the Data Viewer and type = Quote ( Table::HTML ) I copy the result and paste it to replace the Table::HTML part in the web viewer code.
  9. This is very difficult to follow. In general, if you sort by a text field, then the sort is done alphabetically. That would result in the order you show as the wanted order. If you're getting a different result, then you must be sorting by another field first. I get the impression that the first field in your relationship's sort order is a calculation field that converts the same values to numbers. That would explain the actual order you see - because the converted numbers are: 481 661 801 801 801 802 8032 So here only the three records with a common value of 801 would be sorted by the second field in the sort order. I am not sure what exactly you're trying to accomplish here, and I have doubts if your basic approach is the correct one. Dynamic sort of portals is difficult to achieve. I suggest you explain what exactly your requirements are, so we can see if a better method can be found.
  10. comment

    Calculating days and time

    You could save two fields here by using timestamp fields instead. Anyway, you can easily calculate the duration by subtracting: Timestamp ( QuotedDate ; QuotedTime ) - Timestamp ( CreationDate ; CreationTime ) That will give you the total duration in seconds, and now you need to divide it into days, hours and minutes (assuming that's how you want to display it) = Let ( [ elapsed = Timestamp ( QuotedDate ; QuotedTime ) - Timestamp ( CreationDate ; CreationTime ) ; days = Div ( elapsed ; 86400 ) ; time = Mod ( elapsed ; 86400 ) ; hours = Hour ( time ) ; minutes = Minute ( time ) ] ; days & " days, " & hours & " hours and " & minutes & " minutes" ) If this is meant to show an average, then calculate only the elapsed duration, use a summary field to produce the average duration, and another calculation field to break the summary value into its individual components as shown.
  11. You have a self-join relationship, which means you have (at least) two occurrences of the Customers table on the graph. In order to set the variable to the value that appears in the portal row, you must use the occurrence that is used to populate the portal.
  12. comment

    No Table View Available

    Go to Layout mode. Select Layout Setup… from the Layouts menu. In the Views pane, enable Table view.
  13. comment

    Simple question, count of records formula???

    Simply type the record number symbol directly onto the layout - see: https://fmhelp.filemaker.com/help/17/fmp/en/index.html#page/FMP_Help/inserting-variables-on-layout.html
  14. comment

    XML export

    It could be Notepad interpreting CRLF as two line breaks. Or it could be the bug mentioned here: https://fmforums.com/topic/100296-getting-on-xml-export-from-windows-server/
  15. Your script looks nothing like what was suggested.
×

Important Information

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