Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 12/17/2020 in all areas

  1. First of all, there is nothing wrong with your JSON. The problem is with the library Claris are using to parse the JSON, or with their implementation of it. Now, if you know in advance the path to the value you want, you could do simply something like: Let ([ myJSON = Substitute ( $json ; "\"52.5\"" ; "\"52§5\"" ) ; myKey = "putExpDateMap.2021-02-19:46.52§5[0].mark" ] ; JSONGetElement ( myJSON ; myKey ) ) If you are assembling the path from variables, take care to get the exact path as shown above. Note that the value of the "52.5" key is an array; at least in theory it could conta
    2 points
  2. After an e-mail exchange with Claris they provided a fix which might be useful to others. By default the installer extracts to "FileMaker Server 19". However the Setup in that folder won't work if there are any spaces in the path name. To fix the issue move the contents of that folder to somewhere without spaces in the name (for example C:\users\admin\downloads\FMS not C:\users\admin\downloads\FileMaker Server 19). I am amazed and quite annoyed that this simple issue got through testing. I expect better from Claris. However thankfully the fix is simple.
    1 point
  3. The following calculation will return the text before the first comma: Left ( text ; Position ( text ; "," ; 1 ; 1 ) - 1 ) Note that this assumes the given text does contain a comma - otherwise the result will be empty. To extract the text after the first comma, you can use: Right ( text ; Length ( text ) - Position ( text ; "," ; 1 ; 1 ) ) Note that "text after the first comma" includes the space immediately following the comma; if you don't want that, subtract 1 from the calculated position. Alternatively you could start by substituting the comma with a carriage
    1 point
  4. When defining a privilege set, you can set custom privileges for each field. Start by choosing 'Custom privileges…' for Records. Then select a table and choose 'limited…' for Field Access. Then choose 'no access' for each field you don't want the user to see. In addition, you will want to remove these fields from layouts that your user can access. But that's just cosmetics. Only the privilege set settings provide true security.
    1 point
  5. There are couple of ways this could be streamlined. Some of these are cosmetic, but one practically screams off the page: All of your values are retrieved from the same branch of the JSON. Instead of repeatedly parsing the entire tree for each individual value, you should isolate the target branch in a variable once, then parse out the individual values from this variable. IOW, instead of: #____________________________________________________________ #BUILD KEYS TO RETRIEVE VARIABLES Set Variable [ $myMark; Value:$lowerInstrument & "ExpDateMap." & $expiration & ":" &a
    1 point
  6. The field could simply auto-enter = Get ( CurrentTime ) - Time In Then you can decide on what's a reasonable window of difference - say 5 minutes - and hide the icon when: Difference < Time ( 0 ; 5 ; 0 ) However, as I already noted, if you can have a situation where the current time is after midnight and they enter a time before midnight, this will not work as expected. I am surprised to see that your form does not have a date; if it did, you could use a timestamp to calculate the correct difference even across midnight.
    1 point
  7. Suppose you have already defined these variables: $instrument = "put" ; $expiration = "2021-02-19" ; $days = 46 ; $strike = 52.5 ; then you can modify the above calculation to: Let ([ newStrike = Substitute ( $strike ; "." ; "§" ) ; myJSON = Substitute ( $json ; Quote ( $strike ) ; Quote ( newStrike ) ) ; myKey = $instrument & "ExpDateMap." & $expiration & ":" & $days & "." & newStrike & "[0].mark" ] ; JSONGetElement ( myJSON ; myKey ) ) Demo file attached. DEMOParseJSONwDot.fmp12
    1 point
  8. True, but PatternCount() and Position() are not, so you could use that instead. Are you really using version 17? This requires recursion, so if you cannot use the While() function, you will need the Advanced version in order to install a custom function. If you can use a custom function, have a look at: https://www.briandunning.com/cf/578
    1 point
  9. 1 point
  10. I am still a bit confused regarding the format you want because you show grouping by product name, but I don't see a products table. In any case, you seem to have put the finger on the real problem here: in order to show a row for each record in the child table, you must produce the report from the child table. But then parents with no children will not be shown. Filemaker native reporting is unable to satisfy both requirements. You need to do something else. I can think of three possible solutions: 1. Produce the report from the parent table and use a portal to show the child record
    1 point
  11. I would put that JSOn in a global variable ($$JSON) and use the DataViewer to play with it until you get it right. Break down each row and see what it gives back.
    1 point
  12. Pretty ugly but... Let ( [ a = $JSON ; b = JSONGetElement ( a ; "putExpDateMap" ) ; c = JSONListKeys ( b ; "" ) ; d = Position ( a ; c ; 1 ; 1 ) ; e = Replace ( a ; d ; Length(c) ; "MYKEY" ) ; f = JSONGetElement ( e ; "putExpDateMap.MYKEY" ) ; g = JSONListKeys ( f ; "" ) ; h = Position ( f ; g ; 1 ; 1 ) ; i = Replace ( f ; h ; Length(g) ; "MYKEY" ) ; z = "" ]; JSONGetElement ( i ; "MYKEY[0].mark" ) )
    1 point
  13. Is the delivery number unique in the Voorraad_in table? Your screenshot suggests it's not, but it seems like it should be. Also, you have conflicting statements about what the report should show: in your other screenshot you say that the body part should show the total amount of outgoing deliveries; later on you complain that: Body part 3 (see above) only shows one row also when there are more than one related outgoing transactions Do you want your report to show a row for every single outgoing amount?
    1 point
  14. Consider: Let ( [ a = Input - 2 ; b = a / 1.04 ; c = a - b ; d = b / 1.15 ; e = b - d ] ; List ( a ; b ; c ; d ; e ) ) With Input = 121.6, this returns: 119.6 115 4.6 100 15
    1 point
  15. I guess people are using a similar technique for creating and editing portal records after the new FM16 card window feature, any posts or links about this? In any case, this is how I'm doing it (sample attached) ... any feedback appreciated! Create or edit portal records.fmp12
    1 point
This leaderboard is set to Los Angeles/GMT-08:00
×
×
  • Create New...

Important Information

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