ttl Posted February 12 Share Posted February 12 When a custom field's data type is set to Date/Time, what format is it expecting? 2022-04-13 08:04:26 2022-04-13 8:04AM Or something else? Didn't find anything mentioned in the knowledgebase. Link to comment Share on other sites More sharing options...
ttl Posted February 12 Author Share Posted February 12 It ended up taking 2022-04-13 08:04:26 Didn't realize I left a debug print() in my code. Where are custom field scripts kept on the client machine? Link to comment Share on other sites More sharing options...
Moderators Sean Posted February 13 Moderators Share Posted February 13 I have a feature request to make this more obvious, but it does describe the required format in the Custom Field info: If you look at a client's log, you will see multiple entries for custom_field_script. Every Custom Field uses the same script file, it is just overwritten each time and then eventually no file is left behind afterwards. Link to comment Share on other sites More sharing options...
Moderators Sean Posted February 13 Moderators Share Posted February 13 I should probably mention that the Custom Fields are stored locally, but in a non-readable file format. The client extracts them into the above mentioned script file, runs the script, then removes the script file for each Custom Field. Link to comment Share on other sites More sharing options...
ttl Posted February 13 Author Share Posted February 13 (edited) Wow it was literally right in front of my face! I have a python script that when I run it manually on the machine it works, but when it's sent as a custom field script I get failure on about 90% of the machines and I can't figure out why. One would think it'd fail for all or none. No common denominator between the successes and failures (both success & failures are Sonoma, for example) I'd originally erred it being the date format but that is most definitely not the cause. What would be the best approach to troubleshooting such a thing? The client log seems to only have an error code. Edited February 13 by ttl Link to comment Share on other sites More sharing options...
Moderators Sean Posted February 14 Moderators Share Posted February 14 Apple no longer instal Python by default on devices. Have you pushed out Python to these devices? If you have pushed out Python, what version are the clients running and does this match the version you are running and therefore compatible with the script you have written? Link to comment Share on other sites More sharing options...
ttl Posted February 14 Author Share Posted February 14 That ended up being the problem! My test Mac is also the same Mac I do app signing on, so it had Xcode (and dev tools w/ Python) and all of the machines that worked had brew or Xcode on them, too. Every machine that's custom field script was failing didn't have either. Deploying Python did the trick and the Python scripts are fully functional, now! Link to comment Share on other sites More sharing options...
Moderators Sean Posted February 15 Moderators Share Posted February 15 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now