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.

 

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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,657)