function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arvind1Arvind1 

Displaying the values in the column of a datatable conditonally

There is and object by name SPP_Account_Track__c which has a relatonship with Account. I've to display the Account track details of an Account in the form of a datatable with 3 fields Track, qualification status and enrollment status which are there in Account track object.
In the last column 'Action' of the datatable i need to conditionally the values in the form of a link.

If the qualification status is qualified and enrollment status is enrolled, the Action column should have 'View Entitlements' link.
If the qualification status is not qualified and enrollment status is not enrolled, the Action column should have 'View Requirements' link.
If the qualification status is qualified and enrollment status is not enrolled, the Action column should have 'Enroll Now' link.

Any suggestion on how to approach this will be of a great help.

Thanks
Arvind
ESES
If you are using standard controller, and want to do the logic on your page, you can do it by having 3 links in the column (for the 3 options you have) with the condition each one of them is tied to specified in "rendered" attribute of the link.

If the list being used by the table is being generated in your controller/extension you can move this logic to the controller and just have one link that always renders a single link showing what controller has set for that row.
Arvind1Arvind1
Can you please post an example of this kind.