Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
I think you can make it displaytype 4, those are read-only but updatable from workflows and then hide it from the profile of the user. Try that
Answering your previous question: "Would this also work in reports by the way?" No, we still don't have calculated values in reports but you could follow the same pattern I propose above and create a custom field to hold the calculation to report on.
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
04-05-2018, 02:44 PM
(This post was last modified: 04-05-2018, 03:08 PM by Guido1982.)
Thanks, will try that.
About the reports, I don't think I could use the 'format_date' function in a condition? Not sure What you meant by 'follow the same pattern I propose above', since the above pattern does rely on using a function to get the current week no. My question is more about: can we use those functions (not comparison functions, but functions that evaluate to the current week no.) in reports?
I can't update a UI type 4 field from a workflow, so changed it to UI type 1, then I'll just lock it for all profiles (read-only)
Hm, that doesn't work either, since the comparator won't let me select 'less than', it only does so on currency fields. I want to get the SO's with a week no. that is lower than the current week no., so really need to get this comparator. I think it's off to a custom cron job..
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
Are you sure displaytype 4 isn't working? We created it just for that and it is currently in use (besides some clients) in the forecast amount in the application.
Making it read-only in the profiles will not work because the workflows won't update a read-only field that is why we create displaytype 4
AFAIK the "less than" operator will work on any numeric field. I just checked on my development install and it is there. How did you create the week number?
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I'm pretty sure, but again, this is a pretty old install. As we speak I'm in the process of updatin it, but this will take some time since I have to walk through all the hacks I made and replace them with new functionality that we have available now. I also need to write out a whole test procedure (for after the update) since this install is tied to all kinds of portals and a third-party accounting software suite.
However, I checked my own install, that is pretty recent, to check a workflow against the 'spent hours' field in timecontrol. That is a UI type 1 field, no 'smaller than' option. Are you talking about a specific UI type? What I'm trying to say is: how does the application decide which comparators should be available?
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
It depends on the type of the field. If it is numeric (integer, decimal, currency, percent) you will be able to compare with less and greater. If it is a text field those operators are not available.
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
So that's 7,9 and 71? Or does it check the column type in MySQL? I'm not sure if I have these types available yet. I'm writing upgrade notes and posting topics about this as we speak. I think I'll pickup this project after I've upgraded my installation.
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
04-06-2018, 09:12 AM
(This post was last modified: 04-06-2018, 09:12 AM by Guido1982.)
Ah, wait, then I COULD get it to work. Damn, never knew about these typeofdata structures. Thanks!
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Joe, another thing I just found out: I thought you were talking about UI type no. 4, but I just now realized you were talking about display type no. 4.
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
:-)
give displaytype 4 a try and let us know how it goes
Joe
TSolucio