cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Resolver II
Resolver II

Navigation to form not returning correct record

My app is split into two parts, one for the 'Customer' and one for the 'Engineer'. Therefore, a lot of the screens are duplicated with slight amendments. There was probably a better way to do this overall, but I'm too far down this route now.

 

From the respective Customer or Engineer Galleries, the user can navigate to a 'chat' screen which allows them to have an almost Instant Message conversation regarding a specific ticket. On this chat page, there is a button which should take the user to the relevant ticket they're talking about, in case they need to refer to it for whatever reason.

 

This works perfectly on the Customer side, however for some reason the Engineer side will only return the first record in the list, and not the chosen ticket. They are both pretty much the same navigation/selection wise, and so I can't see much reason for it working on one and not on the other. Can anyone see where I've gone wrong?

 

Chat Icon on CustomerList gallery page:

Navigate(CustomerChat); Set(
    itemID,
    ThisItem.ID
); If(
    !IsBlank(
        LookUp(
            Tickets,
            ID = Value(itemID),
            Comments
        )
    ),
    ClearCollect(
        communication,
        Split(
            LookUp(
                Tickets,
                ID = Value(itemID),
                Comments
            ),
            Char(10)
        )
    )
); Set(RefNo, ThisItem.TicketRefno); Select(Parent)

OnVisible of CustomerChat screen:

UpdateContext({resetCan:false}); Refresh(Tickets)

OnSelect of Ticket button on CustomerChat screen:

Navigate(CustomerTicket)

OnVisible of CustomerTicket Form: 

UpdateContext({resetCan:false}); Refresh('Tickets Archive'); Set(varID, Value(RefnoID.Text)); Refresh(Tickets);

CustomerTicket form set to New as default. Items Property of CustomerTicket:

If(TicketForm.Mode = FormMode.View || TicketForm.Mode = FormMode.Edit, JobsList.Selected)

 

Engineer side:

Chat icon on Engineer gallery:

Navigate(EngineerChat); Set(
    itemID,
    ThisItem.ID
); If(
    !IsBlank(
        LookUp(
            Tickets,
            ID = Value(itemID),
            Comments
        )
    ),
    ClearCollect(
        communication,
        Split(
            LookUp(
                Tickets,
                ID = Value(itemID),
                Comments
            ),
            Char(10)
        )
    )
); Set(RefNo, ThisItem.TicketRefno); Select(Parent)

EngineerChat OnVisible:

UpdateContext({resetCan:false}); Refresh(Tickets)

EngineerChat ticket button OnSelect:

Navigate(EngineerTicket)

Engineer Form OnVisible:

UpdateContext({resetCan:false})

EngineerForm Items: 

JobsListEngineer.Selected

Previously as below, but this edit made no difference to the error

If(TicketForm.Mode = FormMode.View || TicketForm.Mode = FormMode.Edit, JobsListEngineer.Selected)

Form default mode is View.

 

Not sure if this information helps but the galleries also have direct 'view form' buttons which navigate directly from the respective gallery to the forms (as the prebuilt > icon does in galleries) and these both work on both galleries, opening the correct item for viewing as expected.

 

Screenshot below to show both the Customer and Engineer buttons and what they show once clicked

engineerchatnavigation.png

 

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,108)