Hi,
I'm trying to set a current item in an Edit form on a screen in a power apps for teams app.
The form is called Form1. I didn't want to store the to-edit entry a global variable, so when I navigate to this screen it's either for a new entry or from a given Param. This is what happens in OnVisible:
If(
IsBlank(Param("SelectedItem")),
NewForm(Form1),
EditForm(Form1);
Form1.Item(Param("SelectedItem"))
)
So Form1 is definitely of type "Edit". The error I'm getting:
'Item' is an unknown property or unsupported function in namespace 'Form1'.
The only properties I'm able to get from Form1 are AcceptFocus, Unsaved, Valid, Visible, BorderColor, BorderStyle, BorderThickness, BorderLanguage, DisplayMode, Error, ErrorKind, Fill
Another question, could I get the Param once and store it in the context of this block only? Or is the smallest available context for storing a variable bound to the screen?