Dynamically change column name on selection of date

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
JhonCena
User
Posts: 4

Dynamically change column name on selection of date

Post by JhonCena »

Hi,

I am developing a weekly time sheet page, where employees will enter his each day working hours on a weekly basis. On add page user will select a week and add related hours spend on each task. I have created two tables for storing timesheet.

Master Table: TimeSheet (TimeSheetID, EmployeeIDFK, ProjectIDFK, TotalWorkinghours)
Detail Table: TimeSheetDetail (TimeSheetDetailID, TaskTypeIDFK, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, Total, TimeSheetIDFK)

The user will select week for which he will add the information. I need to dynamically add selected date range to Monday to Sunday heading columns. Same required to be visible on Master Detail List and view.

Please guide me how I can achieve this.

Regards,
Jhon


mobhar
User
Posts: 11736

Post by mobhar »

To hide the certain field, simply assign FALSE to the "Visible" property that belongs to the Field. For example:

// adjust "YourFieldName" with yours
if ($this->YourFieldName->CurrentValue == "something")
$this->YourFieldName->Visible = FALSE;


Post Reply