cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kp77777
Frequent Visitor

Custom Calculated Lookup Column

Hi All,

 

I'm attempting to create a column in one list that feeds from another list. One list is registration information with a custom id and the other list is questions for that given id. I was wondering if anyone knew of a way to lookup the status of all the questions and if they are all "closed" it would feed into the other lists ID as "Closed" and "Open" if one of the questions from that given id is open. Example: Bob registers and is given id 2, within the registration list both his name and id is collected. The other list would collect his id 2 and then have 26 questions that correlate to that registration. Say Bob leaves 4 of the questions blank because he doesn't have all the answers, the registration column will have a status of "open" and when he goes back and edits these questions it would then say closed when they have all been completed.

 

I'd appreciate any ideas or recommendations for implementation.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kp77777 ,

 

Generally speaking, if you would like to populate the status column (I assume it's a Choices column in the list) based on another list items, and you will use a Patch function to update the SP item, please check below formula:

Patch(
    registration, 
    LookUp(
        registration, 
        id = registrorID    //registrorID is the collected registor id
    ), 
    {Status: 
        {Value:
            If(
                IsBlank(
                    LookUp(
                        Questions, 
                        id = registorID && Status.Value = "Open"
                    )
                ),
                "Closed",
                "Open"
            )
        }
    }
)

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

@kp77777 

SharePoint, Dataverse, Sql?

kp77777
Frequent Visitor

Apologies, SharePoint please

Hi @kp77777 ,

 

Generally speaking, if you would like to populate the status column (I assume it's a Choices column in the list) based on another list items, and you will use a Patch function to update the SP item, please check below formula:

Patch(
    registration, 
    LookUp(
        registration, 
        id = registrorID    //registrorID is the collected registor id
    ), 
    {Status: 
        {Value:
            If(
                IsBlank(
                    LookUp(
                        Questions, 
                        id = registorID && Status.Value = "Open"
                    )
                ),
                "Closed",
                "Open"
            )
        }
    }
)

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

kp77777
Frequent Visitor

Thank you so much Jeffer Ni, this worked perfectly!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,980)