3 Replies Latest reply on Oct 29, 2018 9:02 AM by Uma Ashok

    ICRT Search

    Kumar Garikapati New Member

      Hi - I am writing a search service in ICRT which operations 1) Email Search and 2) Phone Search.The provider is exposing these services with get operation. The requirement is email search should take precedence than phone. Any thoughts on how we can implement this priority? Thanks.

        • 1. Re: ICRT Search
          Uma Ashok Guru

          Hi Kumar, 

           

          If this is a service connector call, are you able to proceed with the Phone search operation based on the results of the Email Search? One after the other? Or is the case that you get the results in one XML and you need to extract something based on the comparison.

           

          Any examples here will help us understand this better.

           

           

          Thanks

          Uma

          • 2. Re: ICRT Search
            Kumar Garikapati New Member

            Here is my request uma...

            {

              "Search": {

               "Email":"123@gmail.com",

               "Phone_Number":"3132220912"

              }

            }

             

            I have two operations in service connector one for e-mail and phone,Based up on the input parameters if phone_number and email id both exists in input, we need to prioritize the call to get operation related to email search and return the response related to email search than phone.

            • 3. Re: ICRT Search
              Uma Ashok Guru

              Hi Kumar,

               

              You can create a temporary boolean variable or a string. Assign the If search result to it and take the decision step accordingly to call the required operation.

               

              Expression that can assign either 0 or 1 to your temporary variable:

               

              if (fn:exists($input.jsonIp//Phone_Number) and fn:string-length(fn:normalize-space($input.jsonIp//Phone_Number)) and fn:exists($input.jsonIp//Email) and fn:string-length(fn:normalize-space($input.jsonIp//Email))) then 0 else 1

               

              Then do a data decision step on the temporary variable and have the process call the respective function in its path.