Yahya Alramadan Posted February 7, 2023 Share Posted February 7, 2023 I would like the code to change the OSIsoft PI data retrieval start time based on the document property input field named StartTime. Any help is appreciated. Link to comment Share on other sites More sharing options...
Atheer Al Attar Posted February 7, 2023 Share Posted February 7, 2023 If you want your PI function start time to come from a document property, you won't need a python script, you just need to map your start time to your document property. If that's not what you are trying to do please elaborate. Link to comment Share on other sites More sharing options...
Yahya Alramadan Posted February 8, 2023 Author Share Posted February 8, 2023 Thanks Atheer for your reply. Actually, it is not a data function. The start time settings can be accessed through a window prompt under the Data Retrieval tab when I add the OSIsoft PI AF as a data source (or edit its related data table) as you can see in the screenshot. My goal is to be able to change that start time through a document property. Trying to reference the document property in the start time field in the prompt (i.e. using ${StartTime}) does not work since it is not a valid format for the AFTime (see the second screenshot). Link to comment Share on other sites More sharing options...
Solution Atheer Al Attar Posted February 8, 2023 Solution Share Posted February 8, 2023 I see you are accessing PI connector through the GUI, is there any reason you can't use the custom data function? Have you checked the tutorial here Link to comment Share on other sites More sharing options...
Yahya Alramadan Posted February 20, 2023 Author Share Posted February 20, 2023 Atheer,I was able to achieve my objective with the custom data function. In fact, refreshing the data function takes less time when compared to data value retrieval through the GUI!Thank you very much for your reply, the tutorial and the YouTube video. They helped a lot. Link to comment Share on other sites More sharing options...
Recommended Posts
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