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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Performing an IF condi...
Power Apps
Answered

Performing an IF condition

(0) ShareShare
ReportReport
Posted on by 17

I am trying to perform an IF condition. Based on my ExpenseID being IsBlank or NOT IsBlank.

The IsBlank condition is firing as expect. By displaying my NOTIFY, REMOVING my record & Navigating back to my browse screen.

 

But, my NOT IsBlank is firing. But it's throwing my NOTIFY message from my IsBlank condition? I am missing something. But I do not see it.

 

 

If (
    Not IsBlank(
        Navigate(
            TravelExpenseLineItemGallery,
            ScreenTransition.Fade,
            {SelectedExpenseID: 'Travel Expense Browse'.Selected.ExpenseID}
        )
    );
    Notify("Travel Expense Detail Records must be removed. Before Travel Form can be deleted!"),
    Navigate(
        'Travel Expense Browse Screen',
        ScreenTransition.None
    )
);


If (
    IsBlank(
        Navigate(
            TravelExpenseLineItemGallery,
            ScreenTransition.Fade,
            {SelectedExpenseID: 'Travel Expense Browse'.Selected.ExpenseID}
        )
    );
    Notify("No Travel Expense Detail Records. Travel Expense has been deleted!"),
    Remove(
        '[dbo].[FusdTravelExpenseForm]',
        'Travel Expense Browse'.Selected
    );
    Navigate(
        'Travel Expense Browse Screen',
        ScreenTransition.None
    )
)

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    Your IsBlank condition is based on the result of the Navigate function??

     

    The Navigate function returns a True or False.

    Navigate normally returns true but returns false if there is a problem with one of its arguments.

    You should be basing your If condition on IsBlank(ExpenseID) or !IsBlank(ExpenseID).

  • Verified answer
    rpowell Profile Picture
    17 on at

    Thansk for tip. I was able to get this to work by doing the following:

     

    If (
        IsBlank(
            LookUp(
                '[dbo].[FusdTravelExpenseLineItems]',
                ExpenseID = ThisItem.ExpenseID
            ).ExpenseID
        ),
        Notify(
            "No Travel Expense Detail Records. Travel Expense has been deleted!",
            Success
        );
        Remove(
            '[dbo].[FusdTravelExpenseForm]',
            'Travel Expense Browse'.Selected
        ),
        Notify("Travel Expense Detail Records must be removed. Before Travel Form can be deleted!")
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard