Hello everyone, I am encountering an issue with double quotes appearing within selections instead of at the beginning and end. Below is the script, and I would appreciate assistance in identifying the necessary changes. Initialization Data Script: HDWDataDir = "D:\Data Logging"; {The log files are located in the History directory} HDWDBDir = "C:\Users\Public\Wonderware\Intouch Applications\Patching SIP"; {The application directory} HDWStartDate = "02/01/2024"; HDWStartTime = "11:00:00"; HDWDuration = "1h"; HDWInterval = "1m"; HDWFilename = "C:\Temp\H1.csv"; HDWTags = "$date,$time"; Tag Selection Script from historical data: SelectTags= HTSelectTag(); HDWTags= HDWTags + "," + SelectTags; Please refer to the provided image for clarification. Thank you for your help.
For effective SEO strategies, it is crucial that HDWTags is formatted as a message tag. The correct format for HDWTags would be: HDWTags = $DateString + " " + $TimeString.
In response to a query, muusic_man suggested that HDWTags should be formatted as a message tag like this: HDWTags = $DateString + " " + $TimeString. However, a recurring issue with double quotes persist when selecting the tag. The script has been adjusted accordingly. Please refer to the attachment for further details.
RockyNivas expressed gratitude for the reply. The HDWTags message tag has been modified in the script, but there is a recurring issue with double quotes appearing every other time the tag is selected. Please refer to the attachment for more information. Don't forget to check out the updated script.
Robertmee asked for the updated script to be displayed. Here is the script provided: Initialize Data Script: The HDWDataDir is set to "D:\Data Logging", which is the directory where log files are stored. The HDWDBDir is set to "C:\Users\Public\Wonderware\Intouch Applications\Patching SIP", which is the application directory. The HDWStartDate is "02/01/2024", the HDWStartTime is "11:00:00", the HDWDuration is "1h", the HDWInterval is "1m", the HDWFilename is "C:\Temp\H1.csv", and the HDWTags are identified by $DateString + "" + $TimeString. Select Tags Script: The SelectTags function is called to retrieve tags. The HDWTags are then updated with the SelectTags information.
Do you want to showcase the tag names or their actual string values on the final line of your display? If you wish to display the tag name in your string animation, consider using Tagname.Name instead of Tagname. This will help you accurately depict the tag names in your animation.
Hey there! Looking at your script, it seems you're facing issues with the double quote appearances due to string encasing. Keep in mind that double quotes signify a string in your current context. Therefore, if you want to include them within a selection itself as part of the output, you might need to escape them. Depending on your script language, you can use a backslash before the double quote, like so: \". Also, you added an image for clarification, but I'm afraid it seems to be missing from your post. Could you kindly re-upload that? It will help us further understand your problem.
As we are looking into your script, it seems like the issue might be happening due to the addition of the SelectTags variable to HDWTags. HDWTags is already initialized as a string with each tag separated by a comma. When you add SelectTags, if that variable contains a string with double quotes in it, those double quotes will appear inside the string and not only at the beginning and end. To remedy this, you might want to add a replace function in order to remove or replace any unwelcome double quotes within the SelectTags variable before adding it to HDWTags. Remember, a cleaner way of managing this would be to manage each tag as an individual string element within a list or array so that you can easily manipulate and control how they are used. Good luck!
From what I can gather, I suspect the issue may be due to how HTSelectTag() is handling and returning values - it might be including double quotes with each selection. If this returns a string with double quotes embedded, this could be the cause of your problem. To prevent this, you might want to add a line of script to remove these extra quotes before the concatenation occurs. Try something like SelectTags = SelectTags.Replace("\"", ""); before the HDWTags= HDWTags + "," + SelectTags; line. This will remove any double quotes from the tag names fetched by HTSelectTag().
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - This issue may be due to how the concatenation of strings is being handled in the script. Check for any errors in adding the double quotes at the beginning and end of the selections.
Answer: - To fix the issue, ensure that the double quotes are correctly placed at the beginning and end of each selection. Review the concatenation of strings and verify the placement of double quotes in the script.
Answer: - You can carefully review the script and pay attention to how strings are being concatenated and formatted. Check if there are any missing or misplaced double quotes that are causing the issue.
Answer: - When concatenating strings in scripts, make sure to properly include double quotes where needed. Consider using escape characters or different methods of string manipulation to ensure correct placement of double quotes.
Answer: - The Tag Selection Script could potentially impact the concatenation of strings in the Initialization Data Script. Review both scripts to see if there are any interactions or dependencies causing the double quote placement problem.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.