5 Replies Latest reply: Nov 12, 2014 2:57 PM by Shane Porter RSS

    Engine API - Get linked field values from another field

      Hi all,

       

      firstly, I'm not sure whether my question is phrased in the best way.  I'll try to explain:

       

      Let's say I have two fields in an App: Film and Actor.  I can create a Sense App, and add two tables.  The first lists the Films, the second lists the Actors.  I can click on a Film, and the data shown in the 'actors' table is reduced (showing only the actor in the selected Film).

       

      I'm trying to replicate this functionality using the Engine API.

       

      1 - Select a film. (a restriction is that the films will be listed in a drop down box, so a selection will only ever be one film anyway)

      2 - Get the associated Actors and display them.

       

      I'm doing the following (pseudo):

       

      1 - Calling 'CreateSessionObject' (as a list object) and 'GetListObjectData' on the 'Film' field to get the Films.  This seems to do the job and I get back the list of Films.

      2 - When the user selects a Film, I call 'selectListObject', passing in the qElemNumber of that item for the '/qListObjectDef' parameter value.

      3 - I then call 'CreateSessionObject' (as a list object) and 'GetListObjectData' on the 'Actor' field to get the associated Actors.  I get all of them back... if I look for a qState value of 'S', I don't get any.

       

      It's not working, so something's not 100%, but is the best way to do this kind of thing? Any comments or help would be much appreciated!  I'm not even sure if it's possible with the approach I've taken.

       

      Thanks for looking

       

      Shane.