Can I ask what scenario/business process you're trying to work with here? I'm not sure I fully understand what you're trying to achieve.
The only scenario I could think of how to check for a duplicate entry is a calculation.
import System static def GetAttributeValue(Request): DuplicateCheck = Request._ReferenceList._Title RefListEntry = Request.GetNamedObject("ConfigItem.CI", DuplicateCheck) if RefListEntry != null: return true return false
No if you have a this within a precondition followed by an automatic action you can move your process to a different status.
Now the second precondition checks again, that it is a duplicate and the properties "default action" and "autoprompt" for the manual action "Change List Entry" are set to true than, the window defined for the action will be displayed automatically.
Just an idea. I have realised this for one of my customers.
The Check the Request Title, if there is a valid domain name entered which dosn't already exist, for examle xyz.abc.com.
If now the .abc.com is missing, or a subdomain CI with the same title already exists the requesting user has to correct his entered data.
If the Duplicate Check dosn't return any value I create a new Subdomain with the title xyz.abc.com
I think what you posted is pretty much exactly what I will need. I do have a few questions though if you don't mind.
1.) Is the calculation you posted entered on the first precondition called Duplicate Check?
2.) IF so, can you post the Precondition logic? (Example: Condition, Value Type, Value)
If I understand the logic correctly (bear with me, I'm still new to programming) then you've defined two values here.
DuplicateCheck, which is the field you want to check for a value and
RefListEntry, which is a combination of DuplicateCheck and "ConfigItem.CI"
3.) Is GetNamedObject a function within Boo?
4.) What exactly is "ConfigItem.CI" in your statement and how does it relate to the problem?
I know that these are somewhat big questions, but before I apply your fix to my problem, I think I have to figure these things out.
1 of 1 people found this helpful
so to your questions:
1) Yes the calc is within the precondition AND the decision named "Duplicate Check"
2) The Condition is Calculation, then my calcuation, Comparsion is equal to, Value true.
Duplicate Check is my variable to save the title of the selected reference list
RefListEntry chekcs in my example if there is already a CI with the same title is it is selected by the user in dere refernece list.
3) Yes, this is a Boo function within Service Desk
4) ConfigItem.CI is the database table I check in my example. You could also use any other object, for example System.Group or whatever. My customer is doing a duplicate Check on CIs, so he can identify if the name of a CI enterd in a string field already exists.
If you have any more question just post them.