Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey all,

heres my problem, basically I have a script which runs the import process at the click of a button but what i would like to do next to the button is show the date last imported

heres and example of my import script:


Show Custom Dialog["warning message"]

If[Get(LastMessageChoice) =2]

Exit Script[]

End If

Import Records[No dialog; Source: "filename.xls"]

all help is much appreciated.

:)

Posted

Create a LastImported field and add a final script step:

Replace( No dialog ; LastImported ; Get( CurrentDate ) )

Posted

I think you mean 'Replace Field Content", not 'Replace'. The same could be achieved by having an auto-entered CreationDate field (provided auto-enter is enabled during import).

IIUC, the question is how to display the date of the most recent import. It could be done by a summary field (Maximum of CreationDate), but this would depend on at least one record from the last batch being included in the current found set. Another option is to keep a separate table of imports and get the date from there using the Last() function. Or just define an "x" self-join and get the last date in the same way. Or set a global field (single-user) or a field in a Settings table (multi-user) to the date at the end of each import.

Posted

Yes, I meant "Replace Field Content," sorry I typed that too fast.

The reason I didn't suggest auto-enter date field is that when you enable auto-enter on import, it applies to all fields that have auto-enter options, which is not always what you want.

I also made the assumption that what was wanted was simply the date that a particular record was imported.

Posted

Create a LastImported field and add a final script step:

Replace( No dialog ; LastImported ; Get( CurrentDate ) )

thanks for your help, and everyone else too it was much appreciated. :

This topic is 6116 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.