Checking for a week number in a workflow expression - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forum-17.html) +--- Forum: Administrator Support (https://discussions.corebos.org/forum-8.html) +--- Thread: Checking for a week number in a workflow expression (/thread-999.html) Pages:
1
2
|
RE: Checking for a week number in a workflow expression - joebordes - 04-05-2018 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. RE: Checking for a week number in a workflow expression - Guido1982 - 04-05-2018 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.. RE: Checking for a week number in a workflow expression - joebordes - 04-05-2018 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? RE: Checking for a week number in a workflow expression - Guido1982 - 04-06-2018 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? RE: Checking for a week number in a workflow expression - joebordes - 04-06-2018 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. RE: Checking for a week number in a workflow expression - Guido1982 - 04-06-2018 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. RE: Checking for a week number in a workflow expression - joebordes - 04-06-2018 yes, those uitypes look good but I'd say it uses the typeofdata column, the first character which holds the type of the field: http://corebos.org/documentation/doku.php?id=en:devel:field_structure#typeofdata_for_fields_in_modules RE: Checking for a week number in a workflow expression - Guido1982 - 04-06-2018 Ah, wait, then I COULD get it to work. Damn, never knew about these typeofdata structures. Thanks! RE: Checking for a week number in a workflow expression - Guido1982 - 04-11-2018 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. RE: Checking for a week number in a workflow expression - joebordes - 04-11-2018 :-) give displaytype 4 a try and let us know how it goes |