cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mmattar
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
KennethNicasens
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
KennethNicasens
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (66,743)