cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Form not populating on Mobile

Hello all,

 

I have a form attached to a gallery selection through a variable. OnSelect property of gallery - > Set(record, Gallery.Selected).

Form "Items" property is set to "record", this works in my browser (Chrome) but when i use my mobile phone, only half of the form gets populated. The form is a view form of the record selected. The Data source is a SQL Table. What can i do to solve this, thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Resolver III
Resolver III

Hello @mmattar ,

 

Is there any other reason why you put the record in a variable?

You could also put the following in the Items property:

Gallery.Selected


Not sure if this is a solution but maybe on the mobile he doesn't get the full record in the variable.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Resolver III
Resolver III

Hello @mmattar ,

 

Is there any other reason why you put the record in a variable?

You could also put the following in the Items property:

Gallery.Selected


Not sure if this is a solution but maybe on the mobile he doesn't get the full record in the variable.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Putting the record in a variable allows the form to not change once a patch or submit function occurs that happens to change the state of the record. For example a patch can update the record to filter out of the gallery, when this happens the form dissapears and reappears to show the next record because the current was removed from the gallery, and in my opinion is not a good UI/UX look, but i did just try Gallery.Selected and it worked in mobile, now have to figure out how to cover up the form updating. Thanks

Maybe as a workaround for this, you can work with 2 galleries?

 

gallery 1 is your selection gallery en gallery 2 is not visable.

Gallery2:

Filter(Datasource, ID = gallery1.selected.id)

Form Items property:

Gallery2.selected

( he will always select the first one)

 

If you don't want to show the form on startup you could set a variable on the OnVisable

Set(_FormVisable,false)

And then you can set this to true on the OnSelect of Gallery1

 

I appreciate your workaround, but i do not like to have too many galleries/controls, Your method does work by the way. I came up with another work around if anyone runs into this problem.

 

On your original gallery, you want to still put the record selected in a variable, Set(record,Gallery.Selected). 

On the Form screen, onVisible property has a variable UpdateContext({itemState: false})

The Forms "item" property has an if statement. If(itemState, record, Gallery.Selected)

In your button or whatever you use to patch or submit the record, you need to update the variable itemState to true -> UpdateContext({itemState: true}). 

 

This solves the mobile issue of the form not showing all items in a form, also fixes the dissapearing and reappearing of the form

 

Thanks @KennethNicasens !

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (60,049)