
I have a customized sharepoint list form with fields that have values cleared based on values in a dropdown multi-select.
To keep it simple, I will focus on one field, txtNewAddress.
txtNewAddress gets its value from a variable "_NewAddress" that is populated on form load from a datacard.
txtNewAddress has a variable also tied to the reset attribute, resetFlag.
The field txtNewAddress needs to be cleared if the aforementioned dropdown does not contain "Forward".
I have this working using the following code on change:
Set(_NewAddress,Blank()); Set(resetFlag, true); Set(resetFlag, false)
However, when I save the record, the blank value is not saved. While I have logic on the form prevents it from appearing in the field, I can see the value in the sharepoint list. This is how I know it did not update.
If I edit the field post reset the field value will save.
If I edit the field post reset, but reset it again it will not save.
So, I think it has something to do with it being reset (maybe reset fields do not save?).
If it matters, I am utilizing buttons as functions for code that is reused often. The above code is in a button that is triggered with a Select() when the ddl changes because that same code is also fired on launch (as this code will eventually also show/hide these fields).
Any help is appreciated.
Hi @joeh,
Can you share a bit more about your issue ?
Can you show me the column type of ‘txtNewAddress’?
How is "_NewAddress" variable populated from a datacard ?
By your saying “if the combo box does not contain Forward”, can you show me the formula about this ?
I made a test . there is no issue on my side .
Column1 is choice type.
Set Onchange property of datacardvalue2 to :
If(DataCardValue2.Selected.Value<>"Forward",Set(NewAddress,Blank());Set(resetFlag,true),Set(NewAddress,DataCardValue2.Selected.Value))
Set Default property of datacardvalue3(txtNewAddress) to :
NewAddress
Set reset property of datacardvalue3(txtNewAddress) to :
resetFlag
Please check if the txtNewAddress field is assigned a value in your formula.
Regards,
Eason