Hi,
I am developing a property inspection app that is linked to an excel workbook in one drive.
The initial page is a browse gallery1. This just has the property name. I want to have a separate sheet for each of the component categories that need to be looked at, such as bathroom, kitchen, fireplace etc. I have made a second gallery (Component Gallery) for easy navigation along with next and back arrows on each component sheet so the user can tab though but also a hamburger menu that will bring the user back to the second gallery. The reason for this is that there is a lot of components. So OnSelect of a property on Browse Gallery1 you are brought to the Component Gallery, on on select of a component eg Bathroom you are brought to a sheet that you can input data on the bathroom
The navigation works fine through the sheets, as in if I click Bathroom in the Component Gallery it will bring me to the bathroom sheet. however, it wont necessarily be for the property that was selected in Browse Gallery1. It may be for the property that is next on the list. Is there anyway to ensure that all the information that is inputted after the selection of a property in Browse Gallery1 is being saved for that property. Any help on this would be greatly appreciated.
Regards,
M
Solved! Go to Solution.
Hi @MubG ,
Sorry, this one slipped though my reply list process.
I can see your issue now in this code
Navigate(ThisItem.Value.Screen,ScreenTransition.Cover)
You cannot use a variable or component value to replace a screen (or any other object) name also where is the edit icon situated - if outside the form, ThisItem will not work. However one thing at a time and assuming you are getting the screen name text value you want, try this
If(
ThisItem.Value = "Screen2"
Navigate(Screen2 ,ScreenTransition.Cover),
ThisItem.Value = "Screen3"
Navigate(Screen3 ,ScreenTransition.Cover),
ThisItem.Value = "Screen4"
Navigate(Screen4 ,ScreenTransition.Cover)
)
etc etc
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.
Hi @MubG ,
What is the Items property of the form - it should be BrowseGallery1.Selected
Hi @WarrenBelz ,
Thanks for getting back to me. I already have item property on all Edit forms as BrowesGallery1.Selected. Unfortunately the problem persists.
Hi @MubG ,
This is strange - what is your code for screen transition and any OnVisible property of the target screens?
Hi @WarrenBelz,
OnSelect for the next button I have :
SubmitForm(EditForm1); UpdateContext({VarLoading:true}); Navigate(Screen1,ScreenTransition.Cover)
The VarLoading is just a loading spinner for the user.
OnVisable for the target page (screen1) I have another loading spinner to be non visible unless the next button is pressed
UpdateContext({VarLoading_3:false})
Hi @MubG ,
So EditForm1 is not on Screen1?
I am clutching at straws a bit here . . .
So sorry @WarrenBelz!
That was a typo on my part. I apologize for the confusion EditForm1 is on Screen 1 and EditFrom2 is on Screen 2.
SubmitForm(EditForm1); UpdateContext({VarLoading:true}); Navigate(EditForm2,ScreenTransition.Cover)
Thanks for the help
Ok @MubG ,
A bit more desperation here - there has to be an anomaly somewhere. I may be asking the same questions here, but troubleshooting as you know tends to find what you assumed . . .
You are clicking on the Bathroom in the Component Gallery - what is the OnSelect of this item.
You are navigating to the "Bathroom Sheet" - what is the name and Items property of this form.
Hi @WarrenBelz,
Yes I understand I've definitively have overlooked something. I will be adding a lot more components and am desperate for a solution before I have to do that..
So heres the BrowesGallery1. This is connected to an excel sheet. On select here I have:
Select(Parent)
.
So once you select a property it brings you to Detail Screen1. OnSelect of the pencil icon here is
EditForm(EditForm1);Navigate(ScrComponentScreen, ScreenTransition.Fade)
Which goes to the components Gallery. OnSelect of one of these components is
Navigate(ThisItem.Value.Screen,ScreenTransition.Cover)
So if you click Bathrooms for example you are brought to EditForm2_Bathroom
OnSelect of the next arrow at the bottom right is:
UpdateContext({VarLoading_3:true}); SubmitForm(EditForm2_Bathroom); Navigate(EditForm3_Kitchen,ScreenTransition.Cover)
Which brings you to the kitchen component which is similar to the bathroom screen.
The user can also select the hamburger menu on the top right and the OnSelect command for that is:
SubmitForm(EditForm2_Bathroom) ; Navigate(ScrComponentScreen,ScreenTransition.Fade);
I always navigate to the edit form of the sheet and the Item property for all edit forms are BrowseGallery1.Selected.