<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									JAVASCRIPT functions - Technical questions				            </title>
            <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/</link>
            <description>Indi.An Germany Discussion Board</description>
            <language>de</language>
            <lastBuildDate>Tue, 08 Sep 2026 21:44:34 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: JAVASCRIPT functions</title>
                        <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-194</link>
                        <pubDate>Sat, 15 Feb 2025 05:26:59 +0000</pubDate>
                        <description><![CDATA[Thanks, I will try and let you know]]></description>
                        <content:encoded><![CDATA[<p>Thanks, I will try and let you know</p>]]></content:encoded>
						                            <category domain="https://www.indi-an.com/community/technical-questions/">Technical questions</category>                        <dc:creator>manoj.kalekar</dc:creator>
                        <guid isPermaLink="true">https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-194</guid>
                    </item>
				                    <item>
                        <title>RE: JAVASCRIPT functions</title>
                        <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-193</link>
                        <pubDate>Fri, 14 Feb 2025 12:35:40 +0000</pubDate>
                        <description><![CDATA[Oh, that&#039;s what you mean. One way is described here in an example project in the old help:The project:&quot;Statuswert in Nachricht umwandeln&quot; has an example of this.an advanced tip that you don&#039;...]]></description>
                        <content:encoded><![CDATA[<p>Oh, that's what you mean. <br /><br /><br />One way is described here in an example project in the old help:<br /><br />The project:<br />"Statuswert in Nachricht umwandeln" has an example of this. <br /><br />https://classicdocs.quickhmi.com/help_quickhmi/actual/online/de/example_projects.html<br /><br /><br />As an advanced tip that you don't have to call a single Events.onVarChanged function for each variable is that you can also use regex for the names: Here is the code adapted from the example project:</p>
<p> </p>
<pre contenteditable="false">//Example variables:
ds.state1
ds.state2
ds.state3
ds.state10
ds.mode1
ds.mode2
ds.mode3
ds.mode10
Datenquelle Intern:
Intern.state1
Intern.state2
Intern.state3
Intern.state10
Intern.mode1
Intern.mode2
Intern.mode3
Intern.mode10
</pre>
<p> </p>
<pre contenteditable="false">//Javascript:
//Messages for a state this is either not numeric, or not starting at index 0.
let stateMessages = {
	4711: "Message for state 4711",
	"4712": "Message for state 4712",
	"NO_CONN": "Message for state 'NO_CONN'",
	"ABC123": "Message for state 'ABC123'"
};

function processState(args) {
	//Get the message based on the variables value.
	let message = stateMessages;
	let _varname = args.variable.name;
	
	//Write the message to the internal variable "stateMessage" that is used in the user interface.
	mainInterface.setVariable("Intern." + _varname, typeof message === "undefined" ? "Invalid state value" : message);
}

//Link variables to the handler functions above.
//This can alternatively done by using the "Scripting" -&gt; "JavaScript" -&gt; "Assignment" page.

Events.onVarChanged(/ds.state\d+|ds.mode\d+/, processState);

</pre>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.indi-an.com/community/technical-questions/">Technical questions</category>                        <dc:creator>MarAlz-RW</dc:creator>
                        <guid isPermaLink="true">https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-193</guid>
                    </item>
				                    <item>
                        <title>RE: JAVASCRIPT functions</title>
                        <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-189</link>
                        <pubDate>Thu, 13 Feb 2025 09:47:30 +0000</pubDate>
                        <description><![CDATA[Yes,  label]]></description>
                        <content:encoded><![CDATA[<p>Yes,  label</p>]]></content:encoded>
						                            <category domain="https://www.indi-an.com/community/technical-questions/">Technical questions</category>                        <dc:creator>manoj.kalekar</dc:creator>
                        <guid isPermaLink="true">https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-189</guid>
                    </item>
				                    <item>
                        <title>RE: JAVASCRIPT functions</title>
                        <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-185</link>
                        <pubDate>Mon, 10 Feb 2025 14:30:51 +0000</pubDate>
                        <description><![CDATA[Do you mean a pop-up message or a value that is displayed in a label / text box, for etc.?]]></description>
                        <content:encoded><![CDATA[<p>Do you mean a pop-up message or a value that is displayed in a label / text box, for etc.?</p>]]></content:encoded>
						                            <category domain="https://www.indi-an.com/community/technical-questions/">Technical questions</category>                        <dc:creator>MarAlz-RW</dc:creator>
                        <guid isPermaLink="true">https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-185</guid>
                    </item>
				                    <item>
                        <title>JAVASCRIPT functions</title>
                        <link>https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-182</link>
                        <pubDate>Thu, 06 Feb 2025 05:11:41 +0000</pubDate>
                        <description><![CDATA[Based on the value I have to show the text message.  I can do this using this in rules / conditions.  But the same is required in many pages. To avoid this , I wanted to make a function and ...]]></description>
                        <content:encoded><![CDATA[<p>Based on the value I have to show the text message.  I can do this using this in rules / conditions.  But the same is required in many pages. To avoid this , I wanted to make a function and pass the value to show the message.</p>
<p>can you help me to create global JS function or provide a link of similiar example.</p>
<p>Simple example:   jsVal2Word(0) = "Zero" ,  (1)="One",    (2)="Two"</p>]]></content:encoded>
						                            <category domain="https://www.indi-an.com/community/technical-questions/">Technical questions</category>                        <dc:creator>manoj.kalekar</dc:creator>
                        <guid isPermaLink="true">https://www.indi-an.com/de/community/technical-questions/javascript-functions/#post-182</guid>
                    </item>
							        </channel>
        </rss>
		