Association value empty after selecting via Execute OQL statement

0
In my application I’m using “Execute OQL “ action in selectable object for reference selector. The execute oql statement retrieves a list of objects and once the user selects that , I am unable to get the value out of it. So in the variable section I can see the association being set but when I am trying to retrieve that value from association it is giving null.   Execute OQL statement retrieves the list of distinct values of an attribute and further provides that list to the reference selector(dropdown). User selects any value from that list but when I am trying to retrieve that value on a onchange action it retrieves null although it validates that the association from reference selector is not empty. Can you please suggest what could be the way around it. Thanks in advance.
asked
2 answers
0

on change of refrence selector call the same MF in which you are executing your OQL statement and pass string parameter 

now place a decision in MF and check condition like $yourEntityobject/selectedAttribute name !=empty if true execute another OQL Statement and Get data filtered by your selected attribute 

else 

retreive all data showing in datagrid (by default).

make sure datagrid refresh interval should be set.

 

answered
0

The OQL doesn't retrieve the "real" objects from your database but rather reads data from DB and creates helper objects filled with the data read from the DB. When using OQL for such UseCases as you do, my approach is always:

  1. Retrieve objects via OQL (at least retrieve the primary key attribute)
  2. Loop through the list and retrieve each object via "Retrieve" action and add it to a new result list
  3. At the end of the flow don't return the OQL list, but the newly created list with "real" objects
answered