Fx Field to Display Date or Text Depending on If Statement
In the standard view (all) for record entries, I would like a column that displays either a date that was recorded as a field or text if that date field was not completed.
So far I have..
let wavDep := Orders.'Waver Deposit';
if wavDep = text("Yes") then
if wavDep = text("No") then
Orders.'Date Deposit Paid'
if wavDep = false then text("Incomplete") end
and it returns the following error - return type mismatch
I get that one is a date and one is text but I dont know quite how to overcome this.
Any help is appreciated.
Thank you for your reply.
That has work in most instances other than displaying the date. Incomplete or N/A displays but it is just a blank field whenever a date should be displayed.
I am wondering if it to do with formatting so I will keep trying but if you have an idea what may have caused it feel free to let me know, it would be greatly appreciated.
Ok so, this is taking a lot more figuring out that I would have expected.
I can only ever get one of the outputs to show, either the date the deposit was paid or the text, I cant get both to show up when they are relevent.
let dateAsTxt := format(date(Orders.'Date Deposit Paid'), "DD/MM/YYYY");
if Orders.'Waver Deposit' = true then
"No Dep. Paid"
This is what I have now, and basically I get the date or a black field not the text I want.