proofgeist / generator

Generator - Store, explore, share and create FileMaker Code
MIT License
35 stars 8 forks source link

Create and Map fields not working in new file #31

Open MaxbizSolutions opened 2 years ago

MaxbizSolutions commented 2 years ago

I have tested the sample files from this link and they worked. https://www.geistinteractive.com/2018/03/13/filemaker-json-parsing-generator/.

I then downloaded the file from github to try the latest version. However, when I tried testing Create and Map fields with the json from a different api, the script would not create the fields in a brand new file. No errors displayed. The fields were not created. The security settings in the new file are using the same as the Generator file, Admin with no password. Here is the API I used. https://www.bankofcanada.ca/valet/observations/FXUSDCAD/JSON?start_date=2021-10-01&end_date=2021-11-04&order_dir=desc

I am using FileMaker 19.3.2 on windows 10.

Does the SQL command "ALTER table" not work consistently in FMP 19?

I tried creating a simple script in the new file to use the same script steps from the script, Copy Over, in the generator file, which creates the fields. I imported the custom functions from Generator and made sure the latest version of the Base Elements plugin were installed.

However this did not work either. Is the ALTER command broken in FMP 19.3.2 on Windows or am I missing something else?

image

joshormond commented 2 years ago

The latest version of BaseElements made a change around some of the JSON functions. That may be part of the issue.

This version of Generator hasn't been updated since 2017. I would try using the generator file that comes with Karbon. It's a little newer, but likely still has an issue with the JSON. You may need to update the function calls to BaseElements JSON functions, to use FileMaker's native functions, and possible some of the SQL calls. I haven't run into any problems in the version I'm using, but I may have already fixed them.

https://github.com/karbonfm/karbonfm