HI @insights360 ,
Based on the formula that you mentioned, I think there is something wrong with it. Currently, within PowerApps app, we could not assign a value to a property of a control directly within another control.
Based on the needs that you mentioned, I think a variable could achieve your needs. Set the OnSuccess property of the Sub Form to following:
Navigate(MainForm,Fade, {SubFormRecord: SubForm.LastSubmit})
Within your MainForm Screen, set the Fill property of the Button6 to following:
If(
!IsBlank(SubFormRecord),
RGBA(99, 139, 44, 1),
RGBA( 0, 0, 255, 1 )
)
In addition, you could also consider set up a global variable to store the submitted record from the Sub Form. Set the OnSuccess property of the Sub Form to following:
Set(SubFormRecord, SubForm.LastSubmit);
Navigate(MainForm,Fade)
Set the OnVisible of the Sub Form screen to following:
Set(SubFormRecord, Blank());
Within your MainForm Screen, set the Fill property of the Button6 to following:
If(
!IsBlank(SubFormRecord),
RGBA(99, 139, 44, 1),
RGBA( 0, 0, 255, 1 )
)
Please take a try with above solution, check if the issue is solved.
Best regards,