SJEaton Posted March 4, 2019 Share Posted March 4, 2019 Hi, I have a custom field which pulls through into an authorisation node which is then obviously displayed in the authorisation task sent to the authoriser. I've used h_custom_22 so as it pulls through as a DD-MM-YYYY format as I thought this meant I wouldn't need to do a date conversion but its still displaying as YYYY-MM-DD in the task (see Payment Due Date in example attached). Why is this?? (It displays fine in other auto-emails where its used) Sam Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 4, 2019 Share Posted March 4, 2019 Hi @SJEaton, Hope you're doing well. You can use the date function in wiki markup to apply the correct format based on your Profile's regional settings. In the Business Process - Within the Authorisation Task definition, you'll have to wrap the variable as below: [date: VARIABLE] In the example below, the value that is injected by the Variable Picker is wrapped inside [date: ] which outcomes to [date: &[functions.pcf("askAQuestion","selectStartDateTime")]]. I hope this helps. Ehsan Link to comment Share on other sites More sharing options...
SJEaton Posted March 5, 2019 Author Share Posted March 5, 2019 ok thanks @Ehsan Link to comment Share on other sites More sharing options...
SJEaton Posted March 7, 2019 Author Share Posted March 7, 2019 Hi @Ehsan I wrapped the variable inside [date: ] but its not quite worked. I have [date:&[global["flowcode"]["customField22"]]] but its outputting as [date:2019-02-26 00:00:00] Can you advise how to amend? Thanks Sam Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 11, 2019 Share Posted March 11, 2019 Hi @SJEaton, Sorry my mistake, [date: ] is a wiki-markup syntax which can for example, be used when providing an update in the Details section. When handling values that are driven by the Variable Picker in the BPM, you simply need to wrap the variable inside []. In the example below in my Business Process, a Progressive Capture answer is wrapped inside []. When viewing the Request, this value is shown as below. I hope this helps. Ehsan Link to comment Share on other sites More sharing options...
SJEaton Posted March 17, 2019 Author Share Posted March 17, 2019 Hi @Ehsan, nope still not working for me. Must still be doing something wrong. This is what I've entered: Original Payment Start Date: [&[global["flowcode"]["customField22"]]] Original Payment End Date: [&[global["flowcode"]["customField23"]]] Proposed New Payment End Date: [&[global["flowcode"]["customField24"]]] This is what displays: Original Payment Start Date: [2019-02-26 00:00:00] Original Payment End Date: [2019-04-03 00:00:00] Proposed New Payment End Date: [2019-04-05 00:00:00] Sam Link to comment Share on other sites More sharing options...
SJEaton Posted March 26, 2019 Author Share Posted March 26, 2019 Hi @Ehsan, do you have any further thoughts on how I rectify this? Thanks Sam Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 27, 2019 Share Posted March 27, 2019 Hi @SJEaton, Spent the morning looking into this; I assumed that it is possible because in My Profile, the preferred date time format was set to YYYY-MM-DD and hence it looked correct to me... but I then went on to update the preferred date time format in My Profile and I can see that the format isn't changed . The date time value is parsed and stored in the description of the task at the point of creation, I checked the database and I can see that the date time value is stored (rather than a reference to the column that the value belongs to), so it won't be possible to load the value on a user by user basis based on their date time format preference. The description field in a task doesn't support wiki-markup by the looks of it and there are no plans at this moment in time to support it unfortunately. Link to comment Share on other sites More sharing options...
SJEaton Posted March 27, 2019 Author Share Posted March 27, 2019 Hi @Ehsan, so basically, date/time custom fields will always display like this if pulled into authorisation nodes? Sam Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 27, 2019 Share Posted March 27, 2019 @SJEaton Yes that's right, I can't see no other way of showing a date/time based on user's preference in tasks. Link to comment Share on other sites More sharing options...
SJEaton Posted March 27, 2019 Author Share Posted March 27, 2019 OK, can this be put forward as a suggestion then as they display nicely in email templates but not in authorisation node tasks (or other tasks) so that would be a nice improvement, thanks Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted March 28, 2019 Share Posted March 28, 2019 +1 for this please........it looks like date formats in Captured task field in an Activity in the BPM also don't follow the date format set in the users' profile: Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 28, 2019 Share Posted March 28, 2019 @SJEaton @Paul Alexander, As this was bugging me (I knew I had it working somehow...), I looked into it again this morning and here's some concrete findings... I have a Progressive Capture that is associated to a Catalog. Within the Progressive Capture, I have a custom form... And a field within the custom form. Please note that the Field ID is startDateTime and the Field Type is Date & Time control. In my Business Process, I have added Entity > Requests > Get Request Information > Progressive Capture Answers automated task. This step is crucial in my findings. In my Human Task, I have used the Variable Picker to locate my field and Inject the variable into the Task details section as below... The injected variable looks like below... I had to wrap the injected variable in between brackets [ ]. I then went on to change my Date Time Format to below. I had previously missed this part - You have to logout and login again for this to take effect. I then went on to raise a Request against my Catalog and prompted to select a Date Time in my custom form. When viewing the task, my preferred Date Time Format is correctly applied. The above is scenario in which Date Time Format will be correctly applied. Here's a scenario where the Date Time Format won't be applied and I believe this is what you're doing @SJEaton, So you have a field in your Request details where you capture Date Time. e.g. "Expected Delivery Date" in the example below. It doesn't actually matter where you're capturing it from - The important note is that it's being saved into h_custom_22 column. In your Process, Entity > Requests > Get Request Information > Request Details automated task returns the Request data and you've used the Variable Picker to inject a value as below. And when viewing the task, it looks like... So I can replicate it. I can see why that is - The raw value is stored against the task, hence the timezone information is missed. I will need to speak to the team internally to understand what can be done here. Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted March 28, 2019 Share Posted March 28, 2019 Hi @Ehsan I think my problem may be slightly different........in my example, I'm not getting info from the PCF necessarily, I'm just asking an analyst who is dealing with the request through an Activity to enter a date in a date/time field. this particular field is not conforming to the date format settings of the analyst (in my case above, my date format settings show dd-mm-yyyy but the date picker in the form is showing as yyyy-mm-dd Which seems a little bit of a let-down after you very in-depth explanation Is this a separate problem do you think? Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 28, 2019 Share Posted March 28, 2019 @Paul Alexander Yep, it is a separate problem but has the same root cause. I have asked the team internally about both those issues. Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 28, 2019 Share Posted March 28, 2019 @Paul Alexander - The issue in relation to Custom Fields in Tasks presenting ab un-formatted Date Time value on selection - This has been accepted as a defect by our development team. @SJEaton, we also looked into the issue that you mentioned here. It will require further investigation, we will get back to you as soon as I have more update on this. Link to comment Share on other sites More sharing options...
SJEaton Posted March 28, 2019 Author Share Posted March 28, 2019 Thats helpful thanks @Ehsan 3 hours ago, Ehsan said: I then went on to change my Date Time Format to below. I had previously missed this part - You have to logout and login again for this to take effect. Where do you change this? Sam Link to comment Share on other sites More sharing options...
Miro Posted March 28, 2019 Share Posted March 28, 2019 @Paul Alexander so I updated date/datetime controls and when editing should be displaying content according to user settings - I think it should be released in 2 weeks from now. @SJEaton it's in your profile settings. Link to comment Share on other sites More sharing options...
Guest Ehsan Posted March 28, 2019 Share Posted March 28, 2019 @SJEaton Home icon > My Profile sub-menu... As below; Link to comment Share on other sites More sharing options...
Guest Ehsan Posted April 5, 2019 Share Posted April 5, 2019 Hi @SJEaton, The development team have added code to wiki markup to cater for the DATETIME value that is returned by custom22 and other DATETIME fields. In the next Hornbill Collaboration build, if you wrap the value in custom22 in square brackets, it should show in the UI as your Profile's format. As below: [&[global["outputParams"]["custom22"]]] Thanks, Ehsan Link to comment Share on other sites More sharing options...
SJEaton Posted May 3, 2019 Author Share Posted May 3, 2019 Hi @Ehsan which build was this in? Sam Link to comment Share on other sites More sharing options...
Victor Posted May 3, 2019 Share Posted May 3, 2019 @SJEaton - Eshan mentioned the next Hornbill Collaboration update...which is yet to happen... Link to comment Share on other sites More sharing options...
SJEaton Posted May 8, 2019 Author Share Posted May 8, 2019 Okey doke Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now