I hope this is the right place to report bugs, if not, let me know where to go, but as the title says, Defaults() is broken.
As this other topic also shows, it's broken in more than one way, but it is acutely broken when referencing a "Date and time" type field where the default value is set to "Today's date" - it is simply not returned whatsoever. Put a "Date and time" field in a SharePoint list, set it to a Default value of "Today's date", and it will not show up even if it's explicitly referenced by Defaults('List').Field. It does work with a fixed date.
I suspect, but I am not willing to test, that this will probably affect default values which are similarly dynamic, i.e. calculated.
Solved! Go to Solution.
Hi @Anonymous ,
Please refer to below doc:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-defaults
Note: Data sources vary in how much default information they provide, including not providing any at all. When you work with a collection or another data source that doesn't support default values, the Defaults function will return an empty record.
Apparently Date and time column default value is not supported to be retrieved into PowerApps. But I'm more wondering why you want to get the default value that in a SP list? In the doc you could see Defaults() basically use along with Patch function.
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
@Anonymous
When saying Defaults() not return anything for DateTime, where did you put todays date? is it Date Picker
Please explain more how do you save the data etc. screenshot will be helpful
Hi @Anonymous ,
Please refer to below doc:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-defaults
Note: Data sources vary in how much default information they provide, including not providing any at all. When you work with a collection or another data source that doesn't support default values, the Defaults function will return an empty record.
Apparently Date and time column default value is not supported to be retrieved into PowerApps. But I'm more wondering why you want to get the default value that in a SP list? In the doc you could see Defaults() basically use along with Patch function.
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |