Tpaairman Posted May 26, 2015 Posted May 26, 2015 (edited) Not sure where else to put this, so here it goes. This is FMP 10, but the problem seems very straight forward. I have a series of number fields, and a date field. As part of my other functions in this table, I need FMP to simply enter the current date in that Date field. I have a startup script that FMP runs when it starts the file, and there rest of it runs as it should. But for some reason, when it gets to this part it puts the date in one of the number fields. I have triple checked, and checked again that the script is set to put it in the right field (it is only one step anyway) but for some reason it just won't go to the correct field. I've read elsewhere that insert a result script steps are not really recommended these days, but I'm not sure how else to go about this one. Edited May 26, 2015 by Tpaairman
eos Posted May 26, 2015 Posted May 26, 2015 Use SetField [ YourTable::yourField ; Get ( CurrentDate ) ] I've read elsewhere that insert a result script steps are not really recommended these days, “Insert Calculated Result” requires the target field to be on the layout (and that is probably the cause of your issue). Set Field[] does not.
Lee Smith Posted May 26, 2015 Posted May 26, 2015 Please update your profile to show what version of FileMaker Pro, your platform and OS you are using. well, eos took my answer.
Tpaairman Posted May 26, 2015 Author Posted May 26, 2015 “Insert Calculated Result” requires the target field to be on the layout (and that is probably the cause of your issue). Set Field[] does not. I did have the script go to that layout then insert the date, but in any event I changed it over to the set field step and it's working. Thank You.
Tpaairman Posted May 26, 2015 Author Posted May 26, 2015 Please update your profile to show what version of FileMaker Pro, your platform and OS you are using. well, eos took my answer. I've updated the OS (I thought that had been done) however my version of FMP is 10, which is not an options, so Other it is.
eos Posted May 26, 2015 Posted May 26, 2015 I did have the script go to that layout then insert the date Just going to the layout isn't enough; as mentioned, the field must be on the layout for “Insert …” to work. To use Set Field[] successfully, OTOH, the script just needs to be in the right context (which could be a layout based on a table related to the one with your date field).
Recommended Posts
This topic is 3471 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