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']'

View Syntax conventions

Samples

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
      }
   }
}

              


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant