Jump to content

Greg Hains

Members
  • Posts

    416
  • Joined

  • Last visited

  • Days Won

    2

Greg Hains last won the day on March 30 2020

Greg Hains had the most liked content!

About Greg Hains

  • Birthday 12/26/1967

Profile Information

  • Industry
    Information Technology
  • Gender
    Male
  • Location
    Brisbane, Australia
  • Interests
    Raspberry Pi, API development.

Contact Methods

  • Website URL
    https://www.dbz.net.au
  • Skype
    greg_hains

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    19

Platform Environment

  • OS Platform
    Mac
  • OS Version
    Big Sur

FileMaker Partner

  • Certification
    Not Certified

Recent Profile Visitors

7,004 profile views

Greg Hains's Achievements

Proficient

Proficient (10/14)

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

Recent Badges

4

Reputation

  1. Hi bcooney. Thank you again. Eureka! There was an error in the syntax of the example the provider had given me. I pushed them for more information when I was getting limited results in my script calls, and got my job escalated, who came back with the amended format, which now works with the original version of the script. I would like to thank you and @Comment for assisting me. Cheers, Greg
  2. Hi bcooney. Thanks for coming back to me. I tried that - see above - but JSONSetElement wasn't very forgiving with the variable I gave it so I figured it wasn't formed in such way it could use it. It displayed OK when i printed it but JSONSetElement couldn't use it. So here I am. :)
  3. Hi Comment, BCooney. The values of Name and MobileNumber have to be just that - I am not populating the JSON with client data, what is happening here is that I am making a call to an major inventory platform to retrieve data from fields that it uses, and have the underlying data returned to me in the response from the Insert From URL command. There are 40-something fields in this system and I only want the Name and MobileNumber returned. This information is base don their API specifications and I have queried the fact that there was more than one text entry in there. I only mentioned two of the fields here (for simplicity) but will need more (of the 40) in the future, so thought I'd start with these just to understand the syntax of the JSONSetElement command. So, to answer your question above, I do want the verbatim text ("Name" , "MobileNumber") shown in the in the first block, but not the second block where there is a name and number. I do not know how to get the text below into the JSONSetElement command with those quotes and the comma - hence trying to build a variable in a previous script step using escape quotes. These are the specs that this platform requires. It may be possible to generate the correct command in a native CURL command, wasn't having any luck within Filemaker. Thanks, Greg
  4. Hi Comment, Thanks for sticking with me. The reason I had to build the JSON by variable was that when I tried to enter more than one value separated by a comma in the JSONSetElement command it threw an error (which is understood because the syntax was broken) so I needed to create that variable (or a field - I don't mind) as a single 'entity' so I could place it in the JSONSetElement command as the "value" parameter. Short question, how do I create and use the following string (including quotes and comma in between them) with the JSONElement command please to get achieve the JSON block above? "Name","MobileNumber" Cheers, Greg
  5. Hi Comment, I need to have the ability to create the JSON based on variables (or fields) through the JSONSetElement command because there are many other factors earlier in the script that will determine how the JSON will look. I can't just use static text blocks of JSON. Does that make sense? That's why I'm trying to understand how the escape quotes are used when creating JSON. Thanks again, Greg
  6. Hi Comment. Thanks for your response. It was the way I typed it sorry. This is the verbatim sample from the supplier's website. It is valid JSON. { "Filter": { "Active": [ "True" ], "OutputSelector": [ "Name", "MobileNumber" ] } } Greg
  7. Hi. Further to the post of: I have a similar problem with applying escape quotes into text. Using these script steps: Set Variable $_outputSelector = "\"" & "Name" & "\"" & "," & "\"" & "MobileNumber" & "\"" JSONSetElement ( ""; ["Filter.Active" ; "True" ; JSONString] ; ["Filter.OutputSelector" ; $_outputSelector ; JSONString] ) I get the 'correct' result of: { "Filter" : { "Active" : "True", "OutputSelector" : "\"Name\",\"MobileNumber\"" } } When what I wanted was actually: { "Filter" : { "Active" : "True", "OutputSelector" : "Name" , "MobileNumber" } } The Filemaker variable displays correctly, however extras are added in the JSONSetElement step.) I also saw other examples where there was an "@" before the variable in the JSONSetElement command but this just gave me errors. Can somebody please show me where I am going wrong? Many thanks in advance, Greg
  8. Hi Steve, Thanks for very much for getting back to me. I never thought that this apparently simple thing would cause me grief. I only experience this issue on the iPad - doing it on Mac or Windows works fine. I explored the Export Field Contents option as I was informed (and I have to find the reference) that only the first page can be displayed when done through a container field on an iPad, and I would have to do it through a webviewer. My container field is setup as "Interactive Content", Browse mode unticked, no Tab Order on the page, and I have tried various other minor settings around it without luck. Sure, it displays the first page, and when I tap it I am given a list of options -which includes View. I click View and it switches to another screen that then views the full document with no problem, then clicking Done on the top left returns to the first screen. Can I either make it so I tap the document and rather than being presented with the Actions context menu (which I know can be modified by the menu set) that it goes directly to a View option (is there a script option that does this?), OR that I can scroll through the PDF document right there in the container field. I tried tips from here but it didn't work for me. Cheers, Greg
  9. Good morning, Further to this: I created a second solution - just a basic file full of Service Manual PDFs. It was also suggested that I put this second file into a container in the main solution, Export Field Contents to the local file system (whose structure I'm not familiar with when it comes to the iPad), then open it again. I have run into a couple of problems with this though. The Export Field Contents gives me no LastError - so I dared to assume it worked - but when I try to then Open File (which as the same credentials and is Authorised) I get an Error 100 (File Not Found). I tried the same on my Mac and saw the file go to a temporary folder as planned, but got the error 825 - so I tried putting the same credentials into both files and File; Manage Security; Advanced; File Access but this didn't help. Is there a "trick" to exporting a solution from container field to a local iPad file system then opening it from there in FM Go (I think it may be cleaner and faster than doing it through a browser - but thank you all the same Ocean West) All suggestions welcome. Even if the solution was installed on the iPad via - say iTunes - would it be possible to update the local file through the hosted file (copying records) and how would I locate/refer to the local file from the hosted solution? Thankyou, Greg
  10. Hi. I've not heard of this one myself, but I might set this up to test it. Thankyou very much again Comment. Greg
  11. Hi Comment. (Sorry about the delayed response.) It's peculiar (to me). Some of those SQL queries are lightning fast and some are slower than an "essay" of Find commands. I'll give both your options a spin and see how I go. Thankyou again. Greg
  12. Hi Comment, Thanks for this. I tried it and had limited success. It still seems to put a gap there even when the hidden boxes (per section) are not displayed, but it certainly a lot better that it was. Thankyou. Greg
  13. Hi Comment, Thanks for replying. I have not tested this, but thought about doing it. The separating space is not an object that can be hidden so it meant that perhaps the space was inside the box, thus I would then have a large space inside the bottom of the box making the content look messy. It would be fine when the section was hidden, but not so when showing. I could always try it.... lol Greg
  14. Good afternoon. Let's say I have a layout with several boxes on it that span the width of the page, and each box is a different section of data. Between each box vertically is a space of approximately 1cm so that when printed the boxes are not all jammed together. I have changed the visibility on some of these boxes and content so if that section is not required on the report then it is not shown, and the items below it move up - that all works fine. My question please is that if - for example - 6 sections (consecutive) are not required on a report, then there is a gap of around 6 cm between the section above and below it. How can I get around this please? Greg
  15. Hi Comment, Thank you very much for coming back to me. I agree, the problem shouldn't exist in the first place, and there is no doubt at all that your suggestions would work. I prefer the SQL one. This is what is happening: there are several forms that the company technicians use when working on equipment. Some forms are filled out, some are not. I am only wishing to have the forms that have any information filled out, so hence wanted to establish the best way to detect an empty record. Thankyou again, I'll see how I go. Cheers, Greg
×
×
  • Create New...

Important Information

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