Issues trying to get Operation Result Reference from Transaction Introspection

Here’s what I’m trying to do:

What is the proper way to “Peek Inside” to get the values from the opResult of a transaction?

(Yes, I’ve watched Mark’s video over and over again :slight_smile:)

For some context, I’m trying to chain transaction operations to a previous operation.

I’ve tried using an index of “0”, and not using an index and just trying to retrieve a value from the list of result(s) like this: (pseudo-code)

  • opResult.result.index[0].objectId or opResult.result.objectId (no index)
  • or trying to get other fields in the same result(s): opResult.result.index[0].nameOfField

I need to get the actual value from a previously run action (through chaining) and retrieve the actual values inside.

Specifically, I need to access a property <list> named: “LotsOfLots” shown here below:

…and no, I’m not trying to use the opResult(s) of a previous operation and use it in a where clause, or anything like that.

Help? :slight_smile:

Hello @Michael_Kadron

The reason you are having trouble “peeking inside” or parsing the opResult with indexes like opResult.result[0].LotsOfLots is because opResult is not actual data yet. When you are chaining operations inside a Transaction Block, Backendless hasn’t actually run the queries or mutations on the server yet. Instead, opResult acts as a virtual reference (or a pointer). It tells the transaction engine: “Take whatever the result of Operation X turns out to be, and feed it directly into Operation Y.” Because it is a reference block and not a standard JSON object/array at design time, you cannot use standard Codeless object/array blocks (like “get property of” or bracket notation) to manipulate or extract properties from it before the transaction executes.

How to achieve what you need:

It depends on what you want to do with that "LotsOfLots" list in the subsequent step:

Scenario A: You want to pass that list or property into another Transaction Operation

If you need to use the result (or a specific property of it) in a subsequent transaction operation (like an Add Relation, Bulk Update, etc.), Backendless provides a special block called “Resolve Op Result” (or “Operation Result Index / Property Reference” depending on the Codeless version).

  • You pass the opResult block into it.
  • You specify the index (if it’s a collection) or the property path (e.g., "LotsOfLots") inside that block.
  • This tells the transaction to resolve that specific sub-property on the server side during execution.

Scenario B: You need to manipulate the data locally (e.g., with logic, loops, or UI binding)

If you need to actually “peek inside” the data to loop through "LotsOfLots", change UI components, or apply client-side logic, you cannot do this inside the transaction block.

  • You must let the transaction execute fully.
  • Wrap your transaction execution block in a “Execute Transaction” block.
  • The transaction block itself will return the final execution results.
  • In the output of the completed transaction, you will get a concrete JSON array containing the actual real-world data of all operations. That is where you can use standard Codeless blocks to parse index [0] and read the .LotsOfLots property.

Could you share a screenshot of the subsequent operation where you are trying to plug this value in? That will help point you to the exact Codeless blocks to use!


Thank you for the in-depth explanation Sergii!

That really helps, but I don’t see any blocks named: “Resolve Op Result” (or “Operation Result Index / Property Reference” as you stated.

I got it to work by simply dragging the block out of the Add Operations To Transaction scope and using a separate API call.

Mike