cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frank89
Helper II
Helper II

Condition for Navigation

Hi everyone, 

as I am still a newbie in building PowerApps, I hope you can help me with this. 

 

I want to build a simple condition to navigate to or skip a screen at the app start. 

If there is an entry in a sharepoint list for the current user and the current year, navigate to screen1, otherwise navigate to screen2. 

Current user: EDV Test User

SPO List: MobilityApp_DB1

 

Where am I wrong? 

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions

@Frank89 Oops! forgot to wrap it in an If. Here you go,

If(IsBlank(LookUp(MobilityApp_DB1, MitarbeiterIn.DisplayName=var_currentuser.DisplayName && Jahr=Year(Now()))), 
	Navigate(SCR_abc),
	Navigate(SCR_xyz)
)

View solution in original post

9 REPLIES 9
CNT
Super User
Super User

@Frank89 

Please try the following,

IsBLank(LookUp(MobilityApp_DB1, MitarbeiterIn.DisplayName=var_currentuser.DisplayName && Jahr=Year(Now())), 
	Navigate(SCR_abc), // Screen 2
	Navigate(SCR_xyz), // Screen 1
)
Frank89
Helper II
Helper II

@CNT 

PowerApps shows me the error: "Invalid number of arguments: received 3, expected 1"

@Frank89 remove the last comma,

 

IsBlank(LookUp(MobilityApp_DB1, MitarbeiterIn.DisplayName=var_currentuser.DisplayName && Jahr=Year(Now())), 
	Navigate(SCR_abc),
	Navigate(SCR_xyz)
)

 

Frank89
Helper II
Helper II

@CNT 

I removed the last comma already. Same error. 

@Frank89 Please share a screen shot of the formula with the error.

Frank89
Helper II
Helper II

@CNT 

here is a screenshot

@Frank89 Oops! forgot to wrap it in an If. Here you go,

If(IsBlank(LookUp(MobilityApp_DB1, MitarbeiterIn.DisplayName=var_currentuser.DisplayName && Jahr=Year(Now()))), 
	Navigate(SCR_abc),
	Navigate(SCR_xyz)
)
Frank89
Helper II
Helper II

Awesome, it works!! Thank you very much!!! 🙂

@Frank89 

Glad to help!

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,131)