cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dsull
Frequent Visitor

Mobile edit form item filter

I have a page (Handoff) in a mobile app that can be navigated to from two different locations. 

 

The first navigation source is from a main menu and configures the page to allow the user to select DENumber field and change the FullName field.  This function changes the owner of a piece of equipment.  DENumber is the primary column of EquipmentV2S Table and FullName is a lookup column of EquipmetV2S Tablle with values in FullName column of EmployeeList Table.

 

Dsull_2-1629680106437.png

 

 

The second navigation source is from a button on gallery list with datasource from EquipmentV2S filtered by FullName = current username.  The button sets a variable to Thisitem.DENumber, which i use as the input to the item filter on the Handoff page.  I also use a boolean variable which is set to True when navigating from the gallery list to configure the DENumber data field to 'view'.  This locks in the item that is being edited allowing the user to only change the Fullname of that item.

 

Dsull_1-1629679980131.png

 

 

I cannot get the if statement and filters to work correctly to sort the items for the Handoff page.  Refer below image for if statement and error generated.

Dsull_0-1629678846198.png

 

Any advice?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Dsull ,

This is why it is always good to post your code in Text and explain where it is rather than trying to blow up and read a picture. For the Item of a Form, you need

LookUp(
   EquipmentV2S,
   DENumber=
   If(
      Handoffview,
      HandoffDamageItem,
      "09999"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @Dsull ,

Try this

Filter(
   EquipmentV2S,
   DENumber=
   If(
      Handoffview,
      HandoffDamageItem,
      "09743M"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Dsull
Frequent Visitor

Thanks for the quick reponse.  I tried your filter formula and still get the error below;

 

Dsull_0-1629690260011.png

 

@Dsull ,

What type of field is DENumber and what is Handoffview (a Boolean Variable?) and HandoffDamageItem (a Text Variable?)

Dsull
Frequent Visitor

DENumber is text

Handoffview is Boolean

HandoffDamageItem is text

 

@Dsull ,

This is why it is always good to post your code in Text and explain where it is rather than trying to blow up and read a picture. For the Item of a Form, you need

LookUp(
   EquipmentV2S,
   DENumber=
   If(
      Handoffview,
      HandoffDamageItem,
      "09999"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Dsull
Frequent Visitor

Thanks.  Apologies for not posting code, this is only my second question, so i will take note for the next time.

 

The lookup function worked. 

@Dsull ,

No problems - I have a blog on good posting practices if you have a few minutes to read it.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,188)