Rollbase Mobile: Could't get the related records fields - Forum - Mobile - Progress Community

Rollbase Mobile: Could't get the related records fields

 Forum

Rollbase Mobile: Could't get the related records fields

  • Hi All,

    I've create a Rollbase Mobile App, Here I retrieve the related records using the default service getAll_R452199 (Example "RB_trip1_Service_trip1_getAll_R452199" ). here it's return only the related record 'id' and the 'record name' . but i want to get other fields too. 

    Any suggestions?

    Thanks in Advance..

  • The View you selected only has the id fields. Look for **_GetViewAll (or something similar) a d try that.

    -Shelley

  • Hi schase,  

    I tried that but **_GetViewAll service only available for get the parent object records not for the child object(Related) records.

    Thanks

  • You need to use the Read service on the object type for which you need to retrieve all details. Apart from the Prime object that is exported other child record's details are not made available in getAllRelated records service as for a mobile device the primary case is to retrieve and show a probable list. And then drilling down on that object show the details. Hence we make available the Read service which gives you all fields for that object based on the ID provided.

    See this document for further details... community.progress.com/.../1133.aspx

    Check section "Use Case: Update records from Mobile - Update Operation" which talks about the Read later into the case.

  • Hello,

    As it has been mentioned, you need to use either use the getViewAll or the READ service to obtain the details of the related records.

    Depending on your requirements and the number of records that you are handling, you could do the following:

    a) Use the getAll_R service to return the related records and then use the READ service to get the detail of a given record.

    b) Use the getAll_R service to return the related records. Then use getViewAll on the related table to get all the records and process them to select the records returned by getAll_R. For this approach, you could use the addRecords() API in the JSDO to populate the related table with the results then use the READ service with the option readLocal = true to show the details for the related records in a list.

    Notice that this approach is to display a list of the related records with the detail, the expectation is that the processing of the related records returned by getAll_R is fast enough that it is ok to read all the records and filter them based on what is returned by the getAll_R service.

    Please let me know if you are interested on approach b) since I can share a project that uses the logic that I described.

    I hope this helps.