I have created Gallery1 on Screen1 and on select of Gallery 1 . Gallery 1 pulls the data from Dataverse. And On select it navigates to status screen when i make changes on silder and submit as form it resets to blank or reset to First item of the gallery
Default: LookUp(data source,'Project Name'=var)
OnSelect: Set(var,ProjectList.Selected.'Project Name')
Items: Sort(If(TabMenu = "All", Search(data source, SearchFieldProjects.Text,"cra32_projectname", "cra32_department"),
TabMenu = "Completed",
Filter(Search(data source, SearchFieldProjects.Text, "cra32_projectname", "cra32_department"), 'Project Status'="Not On Track")), "cra32_projectname", Ascending)
Displayname: DataSourceInfo([@data source],DataSourceInfo.DisplayName,"cra32_scopefullfillment1")
Default: ThisItem.'Scope Fullfillment1'
MaxLength: DataSourceInfo([@data source], DataSourceInfo.MaxLength,"cra32_scopefullfillment1")
When OnChange of the silder "Submitform" but it resets complete info to first item of gallery1. Like Project Name and other data.
How to hold the record of the selected data from the gallery in the screen 2 without changing or resetting to First item of Gallery 1
Soon form submission this is what happens
What is the Item property of your Form and what is the OnChange action of your Slider?
Your OnChange action is going to cause a lot of data submit traffic, which could be detrimental in performance to your app.
But, that aside, Change your OnSelect action on the Gallery to:
Set(glbCurrentRecord, ThisItem); Set(var,ProjectList.Selected.'Project Name');
Then set the Item property of the Form to:
This will keep the submitting of the form to the currently selected record from the gallery.
However, Your Gallery itself will always reset to the first record because you are updating the underlying datasource of the Gallery Items and you have a complex formula (considered so because of the Search and Sort function in it) and the app will reevaluate that formula after the underlying data is changed.
To attempt to keep the gallery on the selected record, you can change the Default property of the gallery to: glbCurrentRecord
That message indicates that the record is not getting set. Check your variable glbCurrentRecord and make sure you have the syntax correct and that it has a record in it.
Okay, so that variable should be getting set whenever you click on a gallery item.
What is the Items property of the gallery and is it based on the same datasource as the form?
Gallery item : Screen 1
Sort(If(TabMenu = "All", Search(Project, SearchFieldProjects.Text,"cra32_projectname", "cra32_department"), TabMenu = "Completed", Filter(Search(Project, SearchFieldProjects.Text, "cra32_projectname", "cra32_department"), 'Project Status'="Not On Track")), "cra32_projectname", Ascending)
Form, Datasource : Screen 2
Then your glbCurrentRecord should contain a valid record that is selected from your Gallery. Need to determine why you are not getting a valid record when you select one in your Gallery. Is the Gallery in Edit mode?
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.