cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FrankPoulton
New Member

Lookup Item in sharepoint list then navigate if true

I have a sharepoint list in which an employee can add items to that list and submits the form. I then want their manager to use the same list but via a different button so they cannot review the list they have just submitted. On the list I have a column with all of the managers names as a choice. I have set a variable as vuser=User().UserName on startup of the App but have tried, Search, lookup and filter commands to confirm if Vuser is actually in the Manager Choice list. Then if it is to navigate to the edit screen for that form or if the name is not on the list then to do nothing. Any help appreciated. It has to be something simple. Using a button with Onselect as:- 

If(LookUp('Source List', Manager=Vuser, Navigate(ManagerEdit,ScreenTransition.None), Navigate(PayrollEdit,ScreenTransition.None))

Where Manager is a Choice Column in the source list and includes all of the manager names.

5 REPLIES 5
zmansuri
Super User
Super User

OnStart 

Set(VUser,Lower(User().FulllName)

 

OnSelect:

If(LookUp('Source List', Manager.Value=Vuser, Navigate(ManagerEdit,ScreenTransition.None), Navigate(PayrollEdit,ScreenTransition.None))

 

you have to use ".Value" with choice type colum.

FrankPoulton
New Member

It won't let me add .value or .txt and coming up with an error when I leave those out. Incompatible types for comparison, the left value is a table and the right value is a text

 

FrankPoulton
New Member

I changed the list (ManagerSelect) to be just a text column with all of the names and renamed the column as ManagerSelect

If(LookUp('ManagerList',ManagerSelect=Vuser,Navigate(HREdit,ScreenTransition.Cover),Navigate(PayrollEdit,ScreenTransition.Cover))

Now coming up with Unexpected characters. The formula contains 'ParentClose' where 'EOF' is expected

zmorek
Super User
Super User

You might be missing a closing parenthesis at the very end

FrankPoulton
New Member

I have tried all combinations of ), at the end, in between and everywhere. Still no joy.. I thas to be something to do with source, column and variable but tried all variations

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,042)