web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : KKIgX2ewv1y3DR/eyGDG5B
Power Apps - Building Power Apps
Answered

extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

Like (0) ShareShare
ReportReport
Posted on 30 Aug 2022 10:22:04 by

Hi, community! I really need help. well, I am building an App that will send the approval request at a multi-level through the PowerApps button click ... I have a central list named Order list. Data is being sent to this list through a Form... this list contains a LookUp column named Department, which is displaying the department name. The DepartmentList have 5 people picker column.

 

My goal is that when a specific department is selected the mail should go to the person in that column,

1: when first-person accepts the request it will send the approval request to the 2nd person,

2: if the first person is missing it should directly send the request to the second person 

3: if the second person is missing the process should stop and update the status o the approval in the list

 

I am stuck with checking the blank entries in the list as (IsBlank(LookUp(Departments, CreateOrder.LastSubmit.Department.Id = cmbDepartments.Selected.Id, 'PO Business Approver'.Email))) is not returning me anything. How do I fetch emails of these users and send mails accordingly

 

Categories:
  • Community Power Platform Member Profile Picture
    on 31 Aug 2022 at 08:10:58
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Set(varFinanceApproverEmail, First(coldepartment).POFinanceApprovalEmail);

     

    Set(varFinanceApproverEmail,Lower(varFinanceApproverEmail));

     

    Office365Outlook.SendEmailV2(
    varFinanceApproverEmail,
    User().FullName & " Made a Purchase Order Request",
    " Here is the Link for Purchese Order <a href = 'https://apps.powerapps.com/play/49d698613432-d850-4c78-b516-5f3e039dbbererrtrbd?tenantId=a991beaf-80...'>Link</a>"
    )

     

     

    but the thing is when I am doing it on a separate button it works all fine.

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on 31 Aug 2022 at 08:07:10
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Hi,

    Could you please send me the formula you have written to save value in variable - varFinanceApproverEmail

  • Community Power Platform Member Profile Picture
    on 31 Aug 2022 at 06:55:52
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Could you please check one more thing... Now the email is going to the first user but if the user approves and clicks the accept button the email to the second user is not sent as it says the 'TO' for the SendEmailV2 is not valid but this is not right because for the second user separately the email is going at the same address + same function

     

    here is the code

     

    could you please tell me what I am doing wrong... I had to submit is work by today

     

    If(
    Value(galDisplayOrders_1.Selected.'Total Including VAT') > 0 && Value(galDisplayOrders_1.Selected.'Total Including VAT') < 30000,
    Patch(
    Order,
    First(
    Filter(
    Order,
    ID = galDisplayOrders_1.Selected.ID
    )
    ),
    {
    Title: DataCardValue22_2.Text,
    'Order Status': {Value: "Pending Finance Approval"}
    }
    );
    Office365Outlook.SendEmailV2(
    varFinanceApproverEmail,
    User().FullName & " Made a Purchase Order Request",
    " Here is the Link for Purchese Order <a href = 'https://apps.powerapps.com/play/49d698613432-d850-4c78-b516-5f3e039dbbererrtrbd?tenantId=a991beaf-80e5-4e17-a39f-a77d27064d05&ReviewPending=PendingScreen'>Link</a>"
    ),

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on 30 Aug 2022 at 12:59:59
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Add .POSeniorBusinessApprovalEmail 

  • Community Power Platform Member Profile Picture
    on 30 Aug 2022 at 12:44:14
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Thank you so much for your help... yes it gives me the email.

     

    First(coldepartment).POBusinessApprovalEmail)

     

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on 30 Aug 2022 at 12:21:04
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Hi,

    If PO Business Approver is single people picker field (not multi select), then you can modify the below formula -

    Set(varBusinessApprovarEmail, First(coldepartment).POBusinessApprovalEmail)

  • Community Power Platform Member Profile Picture
    on 30 Aug 2022 at 11:57:52
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Yes I tries this as well but no luck... I have manage some how to get emails through 

     

     

    ClearCollect(coldepartment, ShowColumns(AddColumns(varDepartmentRecord,"POBusinessApprovalEmail", 'PO Business Approver'.Email), "ID", "POBusinessApprovalEmail"));

     

    and then 

     

    Set(varBusinessApprovarEmail, First(coldepartment.POBusinessApprovalEmail));

     

    this is giving me a record... could you please help me with how could I get the Email value from this record now?

     

    really need help with this

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on 30 Aug 2022 at 11:51:28
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Hi,

    Sorry, I thought that you wanted to check whether approver field is blank or not.

    If you want to extract email why don't you directly use lookup-

    LookUp(Departments, CreateOrder.LastSubmit.Department.Id = cmbDepartments.Selected.Id, 'PO Business Approver'.Email)

    Assuming PO Business Approver is of type single people picker

  • Community Power Platform Member Profile Picture
    on 30 Aug 2022 at 11:39:20
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Thanks for your reply!  yes, I tried this one as well but it's not giving me the email... I had to put  ".Email" to extract the email

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on 30 Aug 2022 at 11:35:19
    Re: extracting Email address from Person column and check if its blank for multi-level approval process through PowerApps button

    Hi,

    Can you please try using below formula - 

    (IsEmpty(LookUp(Departments, CreateOrder.LastSubmit.Department.Id = cmbDepartments.Selected.Id, 'PO Business Approver')))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete