3 Replies Latest reply on Oct 23, 2015 4:44 AM by Mike_Mitchell

    Help with displaying data from external API


      Good morning All.


      I am currently trying to automate a lot of our systems that are integrated with Apple's GSX API.


      Now I have solved the issue of getting the data into Filemaker by creating a custom PHP script that return an XML, FM Reads this, and imports the information into FM.  This works great for unit information and other functions. 


      One big issue I am having is displaying a list of Parts.  Currently I go and grab all parts possible for a repair,  the XML Sends it back into FM as a string containing #'s which seperates each set of parts, and then |'s to separate individual part data.  Using substitute and a  loop I am able to Loop through the parts in my variables and print them to a text box.


      The parts are not stored in a database at all, It is meant to be dynamic so that we do not need to keep updating the hundreds of thousands of parts each time their information changes.  Now what I want to do is display each part in a list/repeating field(Which is not good) or some other kind of table that allows the user to search, and then select an individual part, Which will then put it into the record. 


      Is there currently a clean solution todo this.  Or is my best bet just to convince the higher ups that we need to keep a databse of parts, and develop a solution to update the parts every night (Or something similar)


      Any advice would be great.  Thank you!!

        • 1. Re: Help with displaying data from external API

          I would say it would depend largely on performance and how often the parts list is changed. If it's faster to fetch what you need for each transaction from the API, I'd just do that. If, OTOH, if the parts list doesn't change very frequently and it's a performance hit to fetch every time, then update at night and use a local table. (I suspect that's likely faster, but if the parts list changes a lot, then you risk not having the most up-to-date information.)


          Not much help, but it's not a simple "this is better" answer.



          • 2. Re: Help with displaying data from external API

            Thankfully the parts API Is quite quick,  And is the preferred method, But then I hit the block of how to display the parts list within Filemaker. 


            The parts come in as "Part-Number" "Description"


            Idealy I would love to just be able to put all the parts into a list and display them, But from my understanding,  I can either use Repetitions, Which are a nightmare to work with, Or use a portal which means every search would have to populate a Table, which when having up to 30 engineers updating parts at the same time, could cause issues (The parts returned are spesific to the units serial submitted to Apple)


            Unless there is another method that I am missing But thank you for the Info so far!

            • 3. Re: Help with displaying data from external API

              Perhaps a Virtual List?