I've built a custom object to house our benefits, along with a pretty long/complicated NSQL query to perform the calculations that we need in order to get to our Return on Investment. I've run into one hiccup in that the users will have to go to two separate places - one to enter the benefits (via the custom Benefits object in a list view) and the second to see the calculations (an NSQL portlet).
Is there any way to either:
A) When the user clicks Save, my NSQL query will run and the read only attributes will be populated
or B) Build a script that runs from the Actions menu that will run the NSQL query and populate the read only attributes
Being able to create new benefits from the portlet would also work, but it's my understanding from reading in the community that this is not possible and they have to be created from the Benefits List View through the object.
Thank you in advance for any help!
This technique might help you out ; TIP : How To Put Any Dynamically Generated Value On A Clarity Object
It would allow you to put a dynamically generated readonly field (your ROI) onto your custom object ; it gets populated at displaytime so would refresh upon save/redisplay of the object page. As long as your 'complex' NSQL doesn't take long to execute, this would work I think.
Davids hack works a treat, but depends on how you want it to display.
It doesn't work in the list view sadly
You can call a portlet from the actions menu which passes through parameters.
See timesheet review for an ootb example
^ agreed ; list view is a problem for the 'trick' (not a 'hack' really )
But in the original option [B] you don't need to initiate process from the Actions drop-down, can just do it on 'Save' of the custom-object - a process could run and update data back onto that custom object. The disadvantage of this (IMHO) is that you have to wait for the process to run, which might only be a few seconds but is never quick enough (in my experience) to present the data back on-screen without a further (manual) refresh of the page.
I have also used that 'trick' to build a (parameterised) link to a portlet-page on an object-page (rather than linking to a portlet via the action drop-down) - same difference, less clicks?
Yes that's also an option, a personal preference as it's more intuitive. (icon and bit of text)
A bit off topic but with some magic your "trick" can be used to force refreshing once a process runs and stops when it completes
Andrew Mowlam wrote: A bit off topic but with some magic your "trick" can be used to force refreshing once a process runs and stops when it completes
Andrew Mowlam wrote:
Document that, and add it to the 'tip' please.
documented in this weeks tuesday tip
CA PPM Tuesday Tip - Auto refresh an object instance once process runs
Where could I find an example of doing this? This sounds like the direction I would like to go, but I honestly have never built a custom process.
hcook wrote: Where could I find an example of doing this? This sounds like the direction I would like to go, but I honestly have never built a custom process.
If you are replying to me here about the "trick", then its fully documented with worked examples in that link I gave.
No sorry I meant to build the custom process. I'll do some digging in the community to try to find some instructions!
That might be the solution to my problem as well.
How would you know if there is the need to do update if the source has changed?