cancel
Showing results for 
Search instead for 
Did you mean: 

FSM Screen Configuration "CSTimeRecordingOverview" T&M Journal IF-Statement möglich?

DAcker
Contributor
0 Kudos
415

Hi all,

is it possible to make an if-statement in the T&M Journal Screen Configuration "CSTimeRecordingOverview"?

I tried but it doesn't work, so now I'm not sure if it is general not possible or I made a syntax issue...

Following situation:

I want to get 4 column in the T&M Journal Overview into 2 column. So there is the start date and end date from time effort positions (timeEffort.startDateTime, timeEffort.endDateTime) and from mileage positions (mileage.travelStartDateTime, mileage.travelEndDateTime). I want to display the overview of the T&M Journal as clear and short as possible. Therefore I thought I can summarize these 4 fields into 2 columns.

I tried to implement the logic with an if-statement - so if the time effort end date has an value, this it otherwise the mileage value. I thought about this javascript code:

if(${endDateTime} !== undefined){
    ${endDateTime};
} else {
    ${travelEndDateTime};
}

Then because the screen configuration is in JSON, I escaped the code to this:

if(${endDateTime} !== undefined){\r\n\t${endDateTime};\r\n}else{\r\n\t${travelEndDateTime};\r\n}

And put this in the screen configuration under expression:

It is not working, unfortunately... I don't get an error while saving, but the T&M Journal Overview Tab get not displayed anymore after clicking on it.

Thanks for response.

Best regards

Deborah

Accepted Solutions (1)

Accepted Solutions (1)

fiona_shao0225
Advisor
Advisor

Hi Deborah,

Unfortunately, it doesn't support displaying column based on condition.

Best regards,

Hong

Answers (0)