JTSmith Posted June 8, 2012 Posted June 8, 2012 I have a field "Update", and everytime I run a script on that record, I want it to add a line that says "Script was performed at TimeStamp". How do I add a line to the field, rather than using Set Field? I want to open the record and have the field show a list of each time is was performed. Thanks!!!!
eos Posted June 8, 2012 Posted June 8, 2012 When using Set Field, you can include the original field contents in the calculation: Set Field [ myTargetField ; mytargetField & "¶Script was performed at " & Get ( CurrentTimestamp ) ] EDIT: Oops, once is enough …
Tom R. Posted June 8, 2012 Posted June 8, 2012 Hi JT - You might try something similar to this - Every time the script runs, set a variable, e.g. $timePerformed, to "¶¶Script performed at ..." . Then just use a set field script step and concatenate the variable onto the field, so the set field calculation would be the field name & the variable.
comment Posted June 8, 2012 Posted June 8, 2012 How do I add a line to the field, rather than using Set Field? You do use Set Field, e.g.: Set Field [ YourTable::YourField ; YourTable::YourField & ¶ & "Script was performed at " & Get ( CurrentTimestamp ) ]
JTSmith Posted June 8, 2012 Author Posted June 8, 2012 When using Set Field, you can include the original field contents in the calculation: Set Field [ myTargetField ; mytargetField & "¶Script was performed at " & Get ( CurrentTimestamp ) " When using Set Field, you can include the original field contents in the calculation: Set Field [ Update ; Update & "¶Script was performed at " & Get ( CurrentTimestamp ) " THANK YOU!!!!!!!
Aussie John Posted June 12, 2012 Posted June 12, 2012 is there any reason why set field is preferable to insert text?
LaRetta Posted June 12, 2012 Posted June 12, 2012 Hi John, Insert Text[] will not accept a calculation. And both Insert Text and Insert calculated[] require that the field be on the layout; not so with Set Field[]. :^)
Aussie John Posted June 15, 2012 Posted June 15, 2012 Hi John, Insert Text[] will not accept a calculation. And both Insert Text and Insert calculated[] require that the field be on the layout; not so with Set Field[]. :^) Thanks LaRetta; actually I meant inset calculated but having to be on the layout is the answer.
Recommended Posts
This topic is 4937 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