I've been working on this for a while now, and I'm getting a little frustrated with what I think is probably a simple thing to implement. But I'm on my first ThingWorx project and don't have a lot of "real-world" experience with the product. Here's some background on my situation:
I have a Thing defined that holds a customer's factory information (name, address, contact info, etc.). One of the properties on that Thing is an InfoTable that contains area/group information within that Factory. A good example of an area/group is "Production Line" or "Staging Area" or "Shipping" or "Lunch Room". There is additional information tied to each group: capacity, square footage, etc.
The area/groups are used for human-readable tabulated information only (i.e. they don't require any special services/functionality other than adding, updating, and deleting groups). For this reason, I chose to make this an InfoTable on the Factory Thing instead of making each area/group its own Thing (which would feel like an overly complex data architecture to me). Due to customer requirements that are inflexible, this data MUST be maintained via an external application using the REST API. Additionally, group data can come from multiple sources that don't necessarily have ALL the Factory's area/group data (i.e. a given department may only have access to its own areas/groups within this external application and multiple instances of the application are not connected to each other--they do not know about each other's data).
With that background in mind, I need to use the REST API to add rows to the InfoTable property, update a single row on the InfoTable property when the user updates that data on the external application, and delete a single row on the InfoTable property when deletes happen on the external application. For the updates, I'm attempting to use a service on the Factory Thing that can be POSTed to and initiate updates to the InfoTable, but I keep running into issues. What I want to do is send a REST POST with an ID value (stored on the InfoTable) along with any data changes and have the initiated service only update the single row with the new data on the request.
Long story, short: I need to create a service that will update an InfoTable property like I would update a MySQL table using this:
UPDATE Factory.AreaTable SET areaName=requestAreaName WHERE areaID=requestAreaID;
Any help is greatly appreciated!