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

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,510)