Thanks for the feedback Randy!
This still does not solve my issue though.
My understanding is you cant LastSubmit from a FormMode.New
The reason I need this to happen is this
The first Gallery populates all the items in SP list (Initial),
In this gallery I have a button to edit an item;
Set(selecteditem,Gallery1.Selected);Set(varMode,"Edit");Select( Parent );Navigate(INITIAL,ScreenTransition.None)
I also have a New button outside of the gallery to make new items in the Initial list;
Set(varMode,"New");Navigate(INITIAL);
On the second screen is the form for Initial and a Gallery (AppsGallery)
AppsGallery pulls its data from a separate SP List (Appsdata)
Filter('App Data',SourceID=selecteditem.ID)
There is also an Add New App button;
Set(VarNewApp,true);Navigate(AppDataScreen,ScreenTransition.None)
Onselect of the Gallery Item brings them to the edit form for that specific item in the Appsdata list
Set(VarNewApp,false);Set(VarEditApp,true);Set(Appselecteditem,AppsGallery.Selected);Navigate(AppDataScreen,ScreenTransition.None)
When the User presses Add New App, they navigate to the next screen with Appsdata's Form on it set to New form. They fill it out, and submit, but when they do a a field called SourceID is updated to be selecteditems.ID. This is the common data element between the to lists, and how Apps gallery shows just apps associated with the Initial project. This work seamlessly. Now for the big but,
But, When you start a new project on screen1 with the New button it brings you to Screen2 to fill out the New form for Initial. Now selecteditem is not selected, so there is no data for AppsGallery to use. And if they try to add a new app, there is no selecteditem.ID so it never populates in SourceID so the item gets orphaned on the list with no owner. Another big problem is if the user has just worked on another project and then want to make a new one. When they hit new Screen2 show a new form but Appsgallery is still populated with the items from the last project.
My thoughts were to hide the AppsGallery on screen2 if formmode is New and have the Add New App button onselect:
SubmitForm(Form2);
Set(VarNewApp,true);
Navigate(AppDataScreen,ScreenTransition.None)
And then, have the OnSuccess of the Initial form to;
Set(selecteditem, Form2.Lastsubmit)
This would grab the correct ID for the app to keep working, but unfortunately it is not grabbing the data, and research is showing that you can not get data from LastSubmit from a Formode.New.
The only other option I can think of id forcing the user to go back to the first screen select the project they just created and then edit it, and have the AppsGallery visible only when the form is in Formmode.Edit. This seems like a silly way to do this, I was hoping to find a better way around this.