February 21, 200817 yr 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. :)
February 21, 200817 yr Create a LastImported field and add a final script step: Replace( No dialog ; LastImported ; Get( CurrentDate ) )
February 21, 200817 yr 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.
February 22, 200817 yr 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.
February 25, 200817 yr Author 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. :
Create an account or sign in to comment