I created a .NET application that uses the Rollbase API to read data off our application. The object we are reading from has related fields. How do I create a selectQuery statement that retrieves the values (text) of those related fields instead of its IDs. The query I use is similar to the following: SELECT R51587512, R51684724, R51833374, R51711104 FROM object However, this returns a 2D Array of String that contains the ID of those related fields. How do I get their values instead?
Here's an example of using selectQuery API to retrieve info from related line items:
var arr = rbv_api.selectQuery(
"select name, amount, price from line_item where R8011457={!id}", 100);
var buff = "Name, Amount, Price
";
for (var i=0; i
buff += arr[i][0]+", "+arr[i][1]+", "+arr[i][2]+"
";
}
return buff;
Please note that:
1. It queries related line items object (not base object)
2. It uses R8011457={!id} condition to retrieve records related to current.
Thanks, but I'm using the .NET application to generate a report. Does that mean I have to use the script to retrieve the values of each related item?
You can use the same query with our Web Services API. Please check Chapter 15 for more info.