Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- Example: Interface to another system
- Generated JavaScript interfaces
- Create a request for a new project
- The structure of the request
- Request object
- Simple fields
- Check the xs_string() function
- Check expected parameters in invoke() function
- Check the syntax for the Response function
- Use getValue
- Write the invoking JavaScript code
- Determine the structure of the request and response
- PPM request
- PPM response
Write the invoking JavaScript code
Now that the generated JavaScript gave information on the structure of the code to use for invoke, write the invoking JavaScript code. In this case, the invoking code gets passed in information from a Service Catalog Item. This information is then processed and passed through to the PPM Web Service.
function CreateDemandRequest(CartItem) { try { ///////////////////////////////////////////////////////////////////// // Initialization Section ////////////////////////////////////////////////////////////////// // first, initialize the Service Object for this JavaScript var DemandService=new system.library.DemandService.DemandService(); // set Connection information (optional) DemandService.user = "admin"; DemandService.password = "admin"; // DemandService.location="http://<ppm server>:15000 /itg/ppmservices/DemandService"; DemandService.location="http://localhost:15001 /itg/ppmservices/DemandService"; // create the request object var RequestDemRequest = new system.library.DemandService.createRequest(); //////////////////////////////////////////////////////////////////////// // Data Fill Section //////////////////////////////////////////////////////////////////////// // Data from Cart Item var PlannedStart=system.library.xmlFill. getValue(CartItem.options, "PlannedStart"); var PlannedEnd=system.library.xmlFill. getValue(CartItem.options, "PlannedEnd"); var ProjectName=system.library.xmlFill. getValue(CartItem.options, "ProjectName"); var ProjectManager=system.library.xmlFill.getValue (CartItem.options, "ProjectManager"); var Region=system.library.xmlFill.getValue (CartItem.options, "Region"); var ProjectType=system.library.xmlFill.getValue (CartItem.options, "ProjectType"); // Fill into Web Request RequestDemRequest.requestObj.requestType.setValue ( "PFM - Proposal" ); RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[0].token.setValue ("REQ.VP.KNTA_PLAN_START_DATE"); var String0=RequestDemRequest.requestObj.simpleFields[0] .stringValue_newInstance(); String0.setValue(PlannedStart) RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[1].token.setValue ("REQ.VP.KNTA_PLAN_FINISH_DATE"); var String1=RequestDemRequest.requestObj.simpleFields[1] .stringValue_newInstance(); String1.setValue(PlannedEnd) RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[2].token.setValue ("REQ.VP.KNTA_PROJECT_NAME"); var String2=RequestDemRequest.requestObj.simpleFields[2] .stringValue_newInstance(); String2.setValue(ProjectName) RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[3].token .setValue("REQ.VP.KNTA_PROJECT_MANAGER"); var String3=RequestDemRequest.requestObj.simpleFields[3] .stringValue_newInstance(); String3.setValue(ProjectManager) RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[4].token .setValue("REQ.VP.KNTA_REGION"); var String4=RequestDemRequest.requestObj.simpleFields[4] .stringValue_newInstance(); String4.setValue(Region) RequestDemRequest.requestObj.simpleFields_newInstance(); RequestDemRequest.requestObj.simpleFields[5].token.setValue ("REQ.VP.KNTA_PROJECT_TYPE"); var String5=RequestDemRequest.requestObj.simpleFields[5] .stringValue_newInstance(); String5.setValue(ProjectType) // var ProjectNotes=RequestDemRequest.requestObj. notes_newInstance(); // ProjectNotes.content.setValue("notes"); RequestDemRequest.requestObj.simpleFields[4].token.getValue()) ///////////////////////////////////////////////////////////////////////// // Invoke and final processing ///////////////////////////////////////////////////////////////////////// var DemandResponse = DemandService.invoke ( RequestDemRequest ); if ( DemandResponse.isFault() ) { print( DemandResponse.faultcode.getValue() ); print( DemandResponse.faultstring.getValue() ); print( DemandResponse.detail.getValue() ); return("Failure"); } else { print("Success") return("Success"); } } catch( e ) { print( e ); } } //////////////////////////////////////////////////////////////////////// // Test Call ///////////////////////////////////////////////////////////////////////// //var rc_Code=CreateDemandRequest(CartItem);