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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,528)