Hi,
I'm wondering is it possible to display a message showing the count of a query result ?
DISPLAY MESSAGE and COUNT BO WHERE would seem like likely constructs to use but I don't seem to be able to convert the COUNT result into a literal suitable to display in the message.
Any suggestions ?
Peter
DISPLAY MESSAGE ArithmeticOperation()
Thanks Tom,
I've tried your suggestion, creating a SystemSettings TestCount attribute of type number. When I try to display the default value of the TestCount attribute (which is set to 10), I get an Internal Error. The logs only show error 18 - Process Failed. I haven't ventured any further into updating the attribute at runtime until I get the basic display sorted.
I can't find any detailed documentation on the Count function, but when I create the rule in my process to display the count, the syntax (constructed by the context assistant) is DISPLAY MESSAGE SystemSettings.TestCount
Any further suggestions ?
Peter
I've tried your suggestion, creating a SystemSettings TestCount attribute of type number. When I try to display the default value of the TestCount attribute (which is set to 10), I get an Internal Error. The logs only show error 18 - Process Failed. I haven't ventured any further into updating the attribute at runtime until I get the basic display sorted.
I can't find any detailed documentation on the Count function, but when I create the rule in my process to display the count, the syntax (constructed by the context assistant) is DISPLAY MESSAGE SystemSettings.TestCount
Any further suggestions ?
Peter
One other question - can the DISPLAY MESSAGE function be used to display attributes of a standard BO, or just the SystemSettings BO ?
I don't need my count attribute to be initialised at startup and just wonder can I use another BO attribute to hold the count ? Where the count is stored doesn't matter a lot I guess, but I might end up with various statistics relating to my system all held in a Statistics BO or something similar.
I don't need my count attribute to be initialised at startup and just wonder can I use another BO attribute to hold the count ? Where the count is stored doesn't matter a lot I guess, but I might end up with various statistics relating to my system all held in a Statistics BO or something similar.
Hmm. This works for me in a test bsv:
1) Create attribute of number type: SystemSettings.TestCount with default to 10
2) Create process with 1 rule: DISPLAY MESSAGE SystemSettings.TestCount
3) run in Test mode. Standard | System Settings | click Create button -- to initiate the Systems Settings
4) Run the process created in #2.
Also, DISPLAY MESSAGE does not care which BO is used in the calculation of the message as long as it's in context. I used SystemSettings for the test because it's always in context as long as it has been initiated.
Tom
Tom
PS -- I am running V4.1 build 1159
1) Create attribute of number type: SystemSettings.TestCount with default to 10
2) Create process with 1 rule: DISPLAY MESSAGE SystemSettings.TestCount
3) run in Test mode. Standard | System Settings | click Create button -- to initiate the Systems Settings
4) Run the process created in #2.
Also, DISPLAY MESSAGE does not care which BO is used in the calculation of the message as long as it's in context. I used SystemSettings for the test because it's always in context as long as it has been initiated.
Tom
Tom
PS -- I am running V4.1 build 1159