Conditionally displaying data in grid

Hi, 

I have an interface with a section layout which displays a read-only grid using a!gridField_19r1(). The data is fetched from a DB view using a query rule and displayed in the grid columns.

My requirement is to conditionally display the data in one of the columns called Proposal Type. There is a boolean column named IsEarlyRenewal which stores true or false and for every entry in the view, I need to conditionally display if(IsEarlyRenewal = true, "Early Renewal', whatever the original value of the ProposalType column) .

So, example: 

 id= 12345, IsEarlyRenewal = false, ProposalType = Modification -> ProposalType returned as Modification 

id= 56789, IsEarlyRenewal = true, ProposalType=Modifiction => Proposal Type returned as Early Renewal

Both the Proposal Type and IsEarlyRenewal  are columns in the view and can be fetched on the interface. 

TIA!!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I strongly recommend you to upgrade this grid to use the 19.2+ version of a!gridField() - this upgraded version makes it substantially easier to do row-by-row conditionality like what you're saying you need.  In the deprecated version you're using, it requires looping over the data subset and doing your conditionality within the loops, which is doable but cumbersome and far more easily prone to errors.

Reply
  • 0
    Certified Lead Developer

    I strongly recommend you to upgrade this grid to use the 19.2+ version of a!gridField() - this upgraded version makes it substantially easier to do row-by-row conditionality like what you're saying you need.  In the deprecated version you're using, it requires looping over the data subset and doing your conditionality within the loops, which is doable but cumbersome and far more easily prone to errors.

Children