You are viewing limited content. For full access, please sign in.

Question

Question

Field formula that trims off un-needed characters from lookup data.

asked on June 25, 2021 Show version history

Version Laserfiche 10.4

What I am trying to accomplish:  When selecting a course number, a start date field gets filled in based on a lookup.  That date has the date and time of the course.  Example - xx/xx/xxxx 08:30 am.  I only want the date, not the time.  The time I want trimmed off.

Question:  Is it possible in Laserfiche forms to use the LEFT formula on my date field ( which currently is a single text line, that's read only, that's in a collection ) to trim off the time part of the string, when I select the course number?

If yes, can you show an example?  I could not get this to work.

If not, any suggestions?

 

Thank you so much for your time.

 

 

0 0

Answer

SELECTED ANSWER
replied on June 27, 2021

Hi Michael,

If the time part is not needed at all, just uncheck 'Show Time' of the date field should work.

If the time part is still needed just not same as lookup result, one way to perform formula on lookup result, is to add another hidden date time field to be filled by the lookup rule (e.g. startdate_tobehidden), then use formula like 

=DATE(YEAR(startdate_tobehidden), MONTH(startdate_tobehidden), DAY(startdate_tobehidden))

to clear the time part.

0 0

Replies

replied on June 28, 2021 Show version history

Ziyan Chen,

 

Your first suggestion was what I needed to hear.  Here's what I did:

1.  Changed "read only, single line" field for date to an actual "date field".  

2.  That field has a checkbox, "Show Time", that toggles between time off and on.  Toggled it off.

 

I did not have to use the second solution.  Thank you for your assistance.  As always, greatly appreciated.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.