Newbies jhodges58 Posted November 4, 2008 Newbies Share Posted November 4, 2008 I thought I used this piece of code successfully in a Filemaker 8.5 script, but I can't seem to get it to work in Filemaker 9. I'm trying to flag records as being new (imported into the database that day). If [Get (CurrentTime) = assets:creation_date] Set Field [assets::status; "NEW"] Else Set Field [assets::status; ""] End If Where assets is the table with my records and creation_date is the record creation date. I hit run and nothing happens. Any help would be appreciated. --jon Link to comment Share on other sites More sharing options...
aldipalo Posted November 4, 2008 Share Posted November 4, 2008 (edited) Welcome to the forum. If [Get (CurrentTime) = assets:creation_date] Set Field [assets::status; "NEW"] Else Set Field [assets::status; ""] End If Don't you want: If (assets:creation_date = Get ([color:red]CurrentDate) Set Field [assets::status; "NEW"] Else Set Field [assets::status; ""] End If ? Edited November 4, 2008 by Guest Link to comment Share on other sites More sharing options...
comment Posted November 4, 2008 Share Posted November 4, 2008 You could also make the status field an unstored calculation, and eliminate the flagging process (which is always problematic in a multi-user scenario) altogether. Link to comment Share on other sites More sharing options...
Newbies jhodges58 Posted November 5, 2008 Author Newbies Share Posted November 5, 2008 Worked like a charm. Many thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5792 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