NoOutput clause

Official Content

The NoOutput clause in a Data provider Group means that the Group itself will not be present in the Output, only its subordinate elements.

Syntax

<NoOutput>::= [NoOutput]

Example

Suppose that you want to Output the list of Employees, but showing salary information only to authorized users:

Employees parm(&UserId)
{
   Employee
   {
      Id   = EmployeeId
      Name = EmployeeName
      EarningInfo
         Where IsAutorized(&UserId)
      {
         Salary = EmployeeSalary
         Bonus  = EmployeeBonus
      }
   }
}

The Output (in XML) will be:

<Employees>
   <Employee>
      <Id>123</Id>
      <Name>John Doe</Name>
      <EarningInfo>
         <Salary>30000</Salary>
         <Bonus>5000</Bonus>
      </EarningInfo>
   </Employee>
   ...
</Employees>

But if the Output needs to be 'flat' like this:

<Employees>
   <Employee>
      <Id>123</Id>
      <Name>John Doe</Name>
      <Salary>30000</Salary>
      <Bonus>5000</Bonus>
   </Employee>
   ...
</Employees>

...the NoOutput is sufficient:

Employees parm(&UserId)
{
   Employee
   {
      Id   = EmployeeId
      Name = EmployeeName
      EarningInfo [NoOutput]
         Where IsAutorized(&UserId)
      {
         Salary = EmployeeSalary
         Bonus  = EmployeeBonus
      }
   }
}

 







Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.