Master Detail set content focus not changing the details
Application Type
Reactive
Service Studio Version
11.10.22 (Build 42700)

I used the Master Detail template to create a new screen and changed it to use my "Projects" List. On the left side, the projects are displaying correctly, but on the right it doesn't change the details of the selected project, instead remaining on the first item. The issue occurs in the "ProjectList" screen of my app. Any help would be appreciated. I can simply remove the details section of this screen and have it go directly to the editing screen, but I would like to have a preview/details section like this if possible.

VeersaTechTimesheetv86.oml

Hi Kartik,

I've made some changes on your code and I believe it is working as you want to.

Take a look and if you have any doubt just send me a message.

Best regards,

Ricardo

VeersaTechTimesheetv86.oml

Thank you, the solution works exactly as desired!


mvp_badge
MVP
Solution

Hi Kartik,

I have did some code change in the shared .oml file

Code Changes:

  • Replaced the GetUserById aggregate with GetProjectDetailByProjectId aggregate. 
  • Set the GetProjectDetailByProjectId aggregate Fetch property to OnlyOnDemand and Max.Record property value to 1
  • Set the GetTasksByProjectId aggregate Fetch property to OnlyOnDemand 
  • Show the RightContent of the MasterDetail widget conditionally i.e. only when the Project List record (Left Content) is clicked and refer the project releated information in RightContent from the GetProjectDetailByProjectId  aggregate result-set
  • Within the OnListItemClick handler action flow, refresh the GetProjectDetailByProjectId & GetTasksByProjectId aggregate


Refer to the attached .oml file


I hope this helps you!


Kind regards,

Benjith Sam

VeersaTechTimesheetv86.oml

Thank you, it worked perfectly! I think I understand the solution as well.

mvp_badge
MVP

You're welcome, Kartik.

Glad to help you :)


Kind regards,

Benjith Sam

Hi Kartik Singhal,

If details section always stays on current listitem then please check couple of things -

  1. Please check if selected projectID is correctly being passed on listtemclick event or not.
  2. If yes, then check if inside listitemclick event, aggregate is being filtered by selectedprojectId. 
  3. Check if filtered result is bind with the detail section.

Also, on EditProject button click , see if correct selectedProjectID is passed.

Please let me know if that helps.

Thanks,

Vani

Thank you, I was not filtering, that fixed it!


mvp_badge
MVP
Solution

Hi Kartik,

I have did some code change in the shared .oml file

Code Changes:

  • Replaced the GetUserById aggregate with GetProjectDetailByProjectId aggregate. 
  • Set the GetProjectDetailByProjectId aggregate Fetch property to OnlyOnDemand and Max.Record property value to 1
  • Set the GetTasksByProjectId aggregate Fetch property to OnlyOnDemand 
  • Show the RightContent of the MasterDetail widget conditionally i.e. only when the Project List record (Left Content) is clicked and refer the project releated information in RightContent from the GetProjectDetailByProjectId  aggregate result-set
  • Within the OnListItemClick handler action flow, refresh the GetProjectDetailByProjectId & GetTasksByProjectId aggregate


Refer to the attached .oml file


I hope this helps you!


Kind regards,

Benjith Sam

VeersaTechTimesheetv86.oml

Thank you, it worked perfectly! I think I understand the solution as well.

mvp_badge
MVP

You're welcome, Kartik.

Glad to help you :)


Kind regards,

Benjith Sam

Hi Kartik,

I've made some changes on your code and I believe it is working as you want to.

Take a look and if you have any doubt just send me a message.

Best regards,

Ricardo

VeersaTechTimesheetv86.oml

Thank you, the solution works exactly as desired!


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.