Request Fulfillment Additional Property Validation Of Another Additional Property
Hello, We are currently converting services from Request Management to Request Fulfillment. In Request Fulfillment > Configuration > Request Models, search for desired model, Task Information > Edit > Additional Properties, I have 2 configured, CostCenter and NewCostCenter. Id CostCenter has a label of a question with a dropdown of values of Yes or No. NewCostCenter is a String. In the validation of NewCostCenter, I want to put in a validation on closure, that if CostCenter == "Yes", NewCostCenter must have a value. Here is the JS we have in place:
message.setValue("Please Enter a New Cost Center");
This is not working. If I remove the line vars.$L_file.CostCenter and it's associated close brace, the script works. When I test the variables in the client with RAD Debugger, "d CostCenter in $L.file", get value is null. Same with NewCostCenter. I pull up the record and do a ctrl-H to see the name of the fields, $tempOutput and same if I open properties, and click either field, the input is var/tempOutput. If I do "d $tempOutput", I get this:
<form><select id="CostCenter" inputtype="3" label="Mobile Device Cost Center Update?" style="combo">Yes<option label="No">No</option><option label="Yes">Yes</option></select><text id="NewCostCenter" inputtype="3" label="New Cost Center">asdf</text></form>
This tells me the data is present, I am hoping that I can access CostCenter from NewCostCenter in the validation script and decision from there. Can anyone help me write this line?
Re: Request Fulfillment Additional Property Validation Of Another Additional Property
I believe the problem is that CostCenter and NewCostCenter - even they are additional properties - they are not added to requestTask table. They're virtual fields - pretty much same than Catalog's User Selections are. Basically XML.
Therefore you can't validate those by referring to table's fields like $L.file. Some code is needed to retrieve the values from XML, but there are some builtin functions available.
Please see table svcCatInterface (Open New Request) and it's Expressions page to see how the values are extracted from the XML.
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish