Get ALL related id's using rbf_selectQuery or other clie

Posted by Rollbase User on 20-Sep-2010 15:55

Is there a way to get a list of all related ids using client-side API (similar to the way rbv_api.getRelatedIds (relName, id) works)? I'm using rbf_selectQuery but it only returns the first related record.

All Replies

Posted by Admin on 20-Sep-2010 16:36

That's how it works. Please use getRelatedIds API.

You may achieve better results by querying IDs on the other side of relationship:

select id from (other side) where (define relationship etc)

Posted by Admin on 20-Sep-2010 19:06

Is there a getRelatedIds API that I can use on Portal Pages (ie. client-side)? The only one I found in the documentation was for server-side: rbv_api.getRelatedIds (relName, id)..

I can't query the other side of the relationship because it's a Many to Many cardinality. The same thing would happen - I would only be able to get the first ID.

Posted by Admin on 20-Sep-2010 22:24

You can use

rbf_getFields (objName, id, fields, callback, true);

It will return comma-separated list of ids for lookup field.

Posted by Admin on 21-Sep-2010 04:00

Ok that works. Thanks!

This thread is closed