lidocayne Posted November 1, 2010 Posted November 1, 2010 Can't thank everyone enough for the help I'm getting. Made major progress this past weekend on a project I have, in no small part due to the help I've received. So thank you! My current issue is the following: I have a table with a field called dateSent. No big surprise, this is a date field. What I am trying to do is the following: If the dateSent field is empty, I want it to display "Has never been sent". If, however, the dateSent has a date it in, I would like it to display the date. Any idea on this? I have a feeling it is some sort of calculation field, perhaps with the IsEmpty... but all searching I've done isn't coming up with the correct solution (could be I'm not searching for the correct terms either). Thank you!
comment Posted November 1, 2010 Posted November 1, 2010 "Has never been sent" is not a date - so it has no place in a date field. What is the purpose here? If it's for display only, you can put this text on the layout and format it conditionally. 1
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 @comment: Thank you once again. Yes, I don't want 'has never been sent' to be stored. I want to have that displayed as a condition if dateSent is empty. Thus far I'm not finding the correct syntax on this. Do you know of a good resource on conditional formatting syntax? Thanks!
comment Posted November 1, 2010 Posted November 1, 2010 The syntax would be = not IsEmpty ( YourTable::DateSent ) Set the conditional formatting to font size = 500; that will make the text disappear when DateSent is not empty.
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 Thanks @comment! That 500 point font text trick is slick! Thank you!
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 I added a script step that when a button is pressed to submit the order, the dateSent field is updated with the correct date. This works great! Only problem is that it doesn't update the layout that I'm looking at. I have to move forward a record (or go to another layout) and them come back to see it. Is there a way to 'refresh' a layout or specifically, a field? I tried 'go to layout' - but since I'm already in the layout, it doesn't refresh it.
comment Posted November 1, 2010 Posted November 1, 2010 You could try the Refresh Window[] script step - but this sounds rather weird. Could you post a simple file showing the problem?
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 @comment: Check out this link: http://forums.filemaker.com/posts/b716b85dd1 It appears that it's a problem with FM Pro 11 Adv on the mac (which happens to be my setup). Ugh.
comment Posted November 1, 2010 Posted November 1, 2010 I am using FM Pro 11 Advanced on a Mac and I cannot reproduce your issue.
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 (edited) Ok - will create a small file and attach it to next msg. Edited November 1, 2010 by Guest
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 (edited) So as I created the re-created it I think I found something. When it updates the field, it does so, and all of the text-alterable boxes get an outline around them.. I click anywhere on the layout and it populates. So I don't have to go to the next record and then back... but I *do* have to click on the record to get the showDate to show up. Any idea on that one? I checked the script debugger, and the boxes are definitely showing up with the outline during/after the: "Insert Current Date [rx::dateSent]" script step. I even tried the 'enter browse mode' at end of script... no luck... bascially any data-enterable field is showing up with a box around it. It's as if I need some sort of a way to deselect all... Edited November 1, 2010 by Guest
bcooney Posted November 1, 2010 Posted November 1, 2010 Rather than Insert Current Date, use Set Field [ DateField; Get (CurrentDate) ]
lidocayne Posted November 1, 2010 Author Posted November 1, 2010 @bcooney: Thank you! That fixed it! Another little 'pearl' to add to my ever growing collection!
Recommended Posts
This topic is 5136 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now