cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nviddivo
Regular Visitor

Urgent assistance needed: How to apply lookup to every item in a list

Good Afternoon,

 

I am working to connect two lists. In one list we will have main list that will be include qualifying information for about 5,000 customers. Our staff will use this as a work list to track their transition from a competitor. There are drop downs, status's and notes that will regularly be updated as we work through these clients. I also have a list that will include some additional information, including the date we sent their first shipment. I am doing a power app form with lookup to pull in the shipping date through a unique ID (Patient SRC Number) that is available in both lists. 

 

I am using the following formula for the look up and I am successfully returning data for single row at a time if I edit that row. 

 

LookUp('REMS and Mandatory HUB Shipping Tracker', PatientSrcNumber = Value(DataCardValue7.Text),ShipDate) 

 

I need to be able to update shipping data for all items in the list at least a couple times per day so our staff can see if a shipment has occurred. Does anyone have any tricks for how I can force all items in the list to complete the lookup and return the ship date either real time or on a predetermined schedule? 

 

Thanks!

 

Nick

1 ACCEPTED SOLUTION

Accepted Solutions
v-chenzhi
Community Support
Community Support

Hi @nviddivo ,

 

Do you have two lists in SharePoint and want to Update the ShipDate of the SubList to the ShipDate of the MainList according to PatientSrcNumber?

I assume you have this in SubList and MainList and display MainList in DataTable

vchenzhi_0-1636530113195.png

vchenzhi_1-1636530113197.png

 

Set the Items property of DateTable to following

 

ForAll(
    MainList,
    {
        PatientSrcNumberMAIN: PatientSrcNumberMAIN,
        ShipDateMAIN: LookUp(
            SubList,
            PatientSrcNumberCHILD = PatientSrcNumberMAIN,
            ShipDateChild
        OtherColumnName:OtherColumnName  // Note that if you have other column needed to be assigned value to, please replace it with the real column name
        )
    }
)

 

If ShipDateChild in Sublist is updated, the corresponding ShipDateMAIN in Mainlsit will also be updated

vchenzhi_2-1636530113198.png

 

 

 

Best Regards,

Zhi Chen

View solution in original post

5 REPLIES 5
w1sd0m
Advocate II
Advocate II

use filter not lookup

Thanks, Wisdom. How would you do this? Any more details?

you already have it in the code, try swapping out LookUp with Filter and just add the property selector argument at the end. 

Filter('REMS and Mandatory HUB Shipping Tracker', PatientSrcNumber = Value(DataCardValue7.Text).ShipDate

I won't pretend I am an expert here. I tried as you have it written and it didn't populate the entire list with ship dates. Perhaps I am missing the property selector argument but I don't even know what that is. 

v-chenzhi
Community Support
Community Support

Hi @nviddivo ,

 

Do you have two lists in SharePoint and want to Update the ShipDate of the SubList to the ShipDate of the MainList according to PatientSrcNumber?

I assume you have this in SubList and MainList and display MainList in DataTable

vchenzhi_0-1636530113195.png

vchenzhi_1-1636530113197.png

 

Set the Items property of DateTable to following

 

ForAll(
    MainList,
    {
        PatientSrcNumberMAIN: PatientSrcNumberMAIN,
        ShipDateMAIN: LookUp(
            SubList,
            PatientSrcNumberCHILD = PatientSrcNumberMAIN,
            ShipDateChild
        OtherColumnName:OtherColumnName  // Note that if you have other column needed to be assigned value to, please replace it with the real column name
        )
    }
)

 

If ShipDateChild in Sublist is updated, the corresponding ShipDateMAIN in Mainlsit will also be updated

vchenzhi_2-1636530113198.png

 

 

 

Best Regards,

Zhi Chen

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,530)