
I thought this would be easy, but apparently not. I would like to update a DataCard with two different fields depending on the FormMode. Here's the formula that I used, that did not work:
If(FormMode = FormMode.New, 'DataCard-POnumber'.Text, TextInput3)
The Default for 'DataCard-PONumber' is below. The field is also only visible in new mode. MyVar is a global variable set by selecting an item from a gallery Set(MyVar,ThisItem.'PO Number')
If(SharePointForm1.Mode = FormMode.New, MyVar ,ThisItem.Purchase_x0020_Order)
The Default for 'TextInput3' is below. It only shows up in FormMode.Edit
ThisItem.'Purchase Order Number'
Is it possible to have an IF statement to Update the item?
What kind of error are you getting. Because in the first line you are referencing the control itself which is TextInput3. You have to reference it's properties
If(FormMode = FormMode.New, 'DataCard-POnumber'.Text, TextInput3.Text)