I am having an issue with trying to store the date when status of the ticket was changed to specific value (Integrated SP form):
What I did: I defined 2 variables - 1 to indicate if field has changed to specific value & one to track for which ID it happened and added below code to "on change" property of the "DatacardValueStatus
If(DataCardValueStatus.Selected.Value="Stored",UpdateContext({varStored:true,varStoredID:DataCardValueID.Text}))
Then to the Date field I added to "Default" property:
If(varStored=true And varStoredID=DataCardValueID.Text,Today(),Parent.Default)
The issue I am observing is that when I open any Item with status=Stored --> the variables get generated regardless if DatacardValueStatus was changed to Stored or not as defined in my if condition...
What should I do - is there any more elegant way to achieve what I am trying to do?
Thank you very much in advance for all the kind support.
The logic for DataCardValueID is not clear. What do you expect in DataCardValueID. If you expect example"AAA"
Then revise the formula to:
If(varStored=true And varStoredID="AAA",Today(),Parent.Default)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
@eka24 DatacardValueID I only included because I often have a problem with clearing variables in Integrated Forms and I wanted to define another safety condition (specific ID) that would prevent the Date field to get updated on other records as well in case the variable did not get cleared properly... This way it can't happen that another records Date gets changed by accident... but the issue is that if I reopened my original record the next day the Date would be updated again which should not be the case....
- On change property triggers even if I just open the record...
If I understand you, you want to Check if a Date in your Table exist and also and ID exist. If they exist then set the DatePicker to Today
Is that the case
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
@eka24 No Actually, the only thing I want to do is to set the Date Picker to today in case Status was changed to Distributed.
Any luck with this? I'm looking for a similar solution. I have a PA connected to a SPO list.
I need one or the other to occur:
I'm wondering if this would be easier to configure in Flow...
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |