on 2020 Apr 23 12:54 PM
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
Request clarification before answering.
Hi Deborah,
Unfortunately, it doesn't support displaying column based on condition.
Best regards,
Hong
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.