I'm developing a powerapps applicaiton using SQL Azure DB.
In my scenario I have a list with consultations, when they click on a record they can edit, otherwise the users can create a new consultation. During a consultation they also need to take pictures and go to a camera screen. For this I need to know the last submitted record id.
From my create/edit screen I have a button that goed to the camera page using the following command:
SubmitForm(frmIPLSkinRejuvTestPatch) && Set(SkiRID;frmIPLSkinRejuvTestPatch.LastSubmit) && Navigate(ScrSkinRejuvTreatmentImages;ScreenTransition.Fade;{TTImageType:"Before";SRTreatmentType:"IPL";LastId:frmIPLSkinRejuvTestPatch.LastSubmit.SkinRejuvIPLId})As you can see I set a global variable and a context vaiable, this is for testing purposes..On the camera screen I have a label having the following code as Text property, to see what value is populated:
Concatenate("SRID: ";Text(SKinRID.SkinRejuvIPLId);" - Last submit: ";Text(frmIPLSkinRejuvTestPatch.LastSubmit.SkinRejuvIPLId);" - Last ID: ";Text(LastId))In this label the only value I see is the SRID (global variable), but has an incorrect value (from previous case). This was not updated by the LastSubmit.
//Update 1
When I add the Id field to the form, the LastSubmit function seems to work, only in when the formmode == NewForm. When the mode is EditForm it has no effect. - still not the required result. Am I doing something wrong?
Any idea?