Contains a function that can be used when sending data in JSON format e.g. storing or updating data in a database using Web API to convert date formats. This listing contains the modifyjsondata() function and instructions on how to use the function. Works with any format of Date / Date Time conversion, given that the provided date / date time format as an input to this plug-in is correct as per the JSON. It can also modify list of Date attributes of the JSONObject / JSONArray at a time (e.g. createdOn (Date), modifiedOn (Date)), instead of doing it one after the another.
I have uploaded the new version of this plugin along with the user guide (& old version plugin considering Appian older version compatibility) and hopefully it will be available to download & use shortly (after the approval).
Since you've changed companies and have a new account (aloks0001 vs aloks176) you were unable to submit a new version of this plug-in. I've updated the security on the plug-in so that you submit a new version. Thanks for your contribution!
I am trying to upload a new version of this plugin, but unfortunately I am unable to find any site link to upload a new version of this plugin. Looks like Appian has changes the url's to upload / update a shared component. I had a look on
https://forum.appian.com/suite/sites/shared-components as well as
https://forum.appian.com/suite/sites/appmarket-submissions/page/tasks URL and their respective links / navigations but couldn't find any option to drill down / select an existing plugin and upload new version.
I could see an option to upload a new App at: https://forum.appian.com/suite/sites/appmarket-submissions/page/home URL but no option to upload a new version of an existing plugin.
Could you please help me with the approach / link, if you are across this.
Thanks Alok - unfortunately Community didn't notify me of your reply so I only just now saw this.
In the mean time I was able to reproduce essentially the functionality of this plug-in by the following expression rule (it just requires the Regex functions plugin):
/* GLBL_UTIL_fixJSONDateFormat */
"$2/$3/$1 $4 +0"
If you do create a fixed version of the plug-in, though, I would request an enhancement too: allow multiple date field names to be passed in, and/or allow none to be passed in, in which case the function would just fix all date or dateTime formats found in the passed-in JSON string.
Hi Mike, Apologies for the delay in my response, as I was on a vacation, and apologies for the problem caused in your project due to this plug-in. Also thanks for your input. I will try to upload a new version of this plug-in shortly (probably by this weekend). Once again thanks for identifying this issue. Thanks!
Hi Alok - i've discovered a bug in this plug-in. When a JSON string has its date updated and the date happens to be the last field in the CDT / Dictionary, the returned JSON string accidentally omits the final "]" and "}" characters. It seems to only happen when the updated property is the last one in the cdt/dictionary, i.e. in my tests if I add an extra field after, the problem disappears.
For example here's a test dictionary with date fields for "created" and "modified". When i just update "created", the output is correct as I expect:
However when i update "modified", since it's the last field, it omits the last 2 closing characters:
This is causing us some pretty weird and severe issues in our project where we're using this plug-in, as certain things are randomly failing when the JSON text is re-loaded.
© 2020 Appian. All rights reserved.