<?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/">
  <channel>
    <title>DEV Community: zuUwn21</title>
    <description>The latest articles on DEV Community by zuUwn21 (@zuuwn21).</description>
    <link>https://dev.to/zuuwn21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1656880%2F612bd4d4-1ded-4e4a-b908-23bcaa3fc1ff.png</url>
      <title>DEV Community: zuUwn21</title>
      <link>https://dev.to/zuuwn21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zuuwn21"/>
    <language>en</language>
    <item>
      <title>🔄 Uniface forlist...endfor: Mastering List Loops</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Fri, 11 Jul 2025 21:44:48 +0000</pubDate>
      <link>https://dev.to/zuuwn21/uniface-forlistendfor-mastering-list-loops-kaj</link>
      <guid>https://dev.to/zuuwn21/uniface-forlistendfor-mastering-list-loops-kaj</guid>
      <description>&lt;h2&gt;
  
  
  📝 Introduction
&lt;/h2&gt;

&lt;p&gt;As a Uniface developer, you frequently encounter the need to process lists. The &lt;code&gt;forlist...endfor&lt;/code&gt; loop is a powerful tool in Uniface 10.4, designed exactly for this purpose. In this post, I'll explain how to use this loop effectively! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 What is forlist...endfor?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;forlist...endfor&lt;/code&gt; statement defines a loop that processes all items in an indexed list. It's available in all Uniface component types and provides an elegant solution for list processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  📋 Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forlist Item {, Index} in SourceList 
  Your ProcScript 
endfor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔧 Parameters in Detail
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Item&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Current list item&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Index&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;td&gt;Item number in list&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SourceList&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Variable or field containing Uniface (Gold-separated) list&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  ⚙️ How it Works
&lt;/h2&gt;

&lt;p&gt;The loop functions as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🔄 &lt;strong&gt;Iteration&lt;/strong&gt;: Each time the loop reaches &lt;code&gt;endfor&lt;/code&gt;, Item and Index (if defined) are incremented&lt;/li&gt;
&lt;li&gt;🛑 &lt;strong&gt;Termination Conditions&lt;/strong&gt;: The loop stops when:

&lt;ul&gt;
&lt;li&gt;Item number &amp;gt; last item number&lt;/li&gt;
&lt;li&gt;Index &amp;gt; last item number
&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;break&lt;/code&gt; statement is encountered&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Index Value After Loop&lt;/strong&gt;: Index = last item number + 1 (or position at break)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  💡 Practical Example
&lt;/h2&gt;

&lt;p&gt;Here's a concrete example that searches for "Pompey" in a list of ancient cities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;variables
    string vList
    string vItem
    numeric vIndex
endvariables

vList = "Athens;Rome;Syracuse;Pompey;Sparta"

forlist vItem, vIndex in vList
    if (vItem = "Pompey")
        putmess "Loop processing stopped on Item number: %%vIndex, Value: %%vItem"
        break
    endif
    putmess "Processing Item number: %%vIndex, Value: %%vItem"
endfor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📤 Output:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Processing Item number: 1, Value: Athens
Processing Item number: 2, Value: Rome
Processing Item number: 3, Value: Syracuse
Loop processing stopped on Item number: 4, Value: Pompey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎯 Best Practices
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Do's:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manipulate Index&lt;/strong&gt;: You can change the Index within the loop for conditional control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Break&lt;/strong&gt;: Utilize &lt;code&gt;break&lt;/code&gt; for early termination when finding values&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meaningful Variable Names&lt;/strong&gt;: &lt;code&gt;vItem&lt;/code&gt; and &lt;code&gt;vIndex&lt;/code&gt; are self-explanatory&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❌ Don'ts:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Infinite Loops&lt;/strong&gt;: Pay attention to correct termination conditions when manipulating Index&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consider Performance&lt;/strong&gt;: For very large lists, consider alternative approaches&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚀 Advanced Use Cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔍 Search and Replace:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forlist vCurrentItem, vCurrentIndex in vDataList
    if (vCurrentItem = vSearchValue)
        ; Replace or process found value
        break
    endif
endfor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📊 Data Validation:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forlist vItem, vIndex in vInputList
    if (!$numeric(vItem))
        putmess "Invalid value at position %%vIndex: %%vItem"
        vHasErrors = 1
    endif
endfor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🎯 Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;forlist...endfor&lt;/code&gt; loop is an indispensable tool for every Uniface developer. It provides a clean, readable solution for list processing and enables complex processing logic through its flexibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it out and let me know in the comments how you use forlist in your projects!&lt;/strong&gt; 💬&lt;/p&gt;

&lt;p&gt;&lt;em&gt;📚 Based on: Uniface 10.4 Documentation (Last Updated: June 20, 2024)&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;🤖 This post was created with AI assistance&lt;/em&gt;&lt;/p&gt;

</description>
      <category>uniface</category>
      <category>loops</category>
      <category>coding</category>
      <category>development</category>
    </item>
    <item>
      <title># 🐛 Uniface Debugging: The `debug` Statement Explained</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Fri, 11 Jul 2025 21:20:22 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-debugging-the-debug-statement-explained-31kh</link>
      <guid>https://dev.to/zuuwn21/-uniface-debugging-the-debug-statement-explained-31kh</guid>
      <description>&lt;h2&gt;
  
  
  🚀 What is the &lt;code&gt;debug&lt;/code&gt; Statement?
&lt;/h2&gt;

&lt;p&gt;As a Uniface developer, you're certainly familiar with the challenges of debugging complex applications. The &lt;code&gt;debug&lt;/code&gt; statement is a powerful tool that helps you step through your components and identify issues systematically.&lt;/p&gt;

&lt;h2&gt;
  
  
  📋 Basics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;debug&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Return Values:&lt;/strong&gt; None&lt;br&gt;
&lt;strong&gt;Usage:&lt;/strong&gt; Allowed in all Uniface component types&lt;/p&gt;
&lt;h2&gt;
  
  
  🔧 How Does It Work?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;debug&lt;/code&gt; statement puts your component into debug mode:&lt;/p&gt;
&lt;h3&gt;
  
  
  🖥️ GUI Environment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Starts the Uniface Debugger&lt;/li&gt;
&lt;li&gt;Enables entering debugging commands&lt;/li&gt;
&lt;li&gt;Provides a complete graphical interface&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  💻 Character Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Shows a debug command line at the bottom of the screen&lt;/li&gt;
&lt;li&gt;Works in text-based environments as well&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🎯 Practical Application
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Standard Implementation
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;;Exec trigger
debug
edit
end ; end trigger
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  📱 Development vs. Production Environment
&lt;/h3&gt;

&lt;p&gt;During development, it's common to place the &lt;code&gt;debug&lt;/code&gt; statement in the &lt;strong&gt;Switch Keyboard trigger&lt;/strong&gt; at the application level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trigger keyboardSwitch 
if ($logical("SwitchKeyboard") = "debug")
 debug
endif
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;⚠️ Important Note:&lt;/strong&gt; The statement should be removed before production or embedded in a conditional instruction!&lt;/p&gt;

&lt;h2&gt;
  
  
  🏢 Server Debugging
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🚫 Limitations
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;debug&lt;/code&gt; statement is &lt;strong&gt;not&lt;/strong&gt; implemented for the Uniface Server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Debugger is neither started nor stopped&lt;/li&gt;
&lt;li&gt;Windows server processes cannot start windowing applications that need a desktop to run on&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💡 Solution for Server Debugging
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start the Debugger before the server&lt;/strong&gt; (manually or via Uniface Router)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For remote debugging:&lt;/strong&gt; Configure a unique TCP port for communication&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🔧 Enabling Debugging in Deployed Applications
&lt;/h2&gt;

&lt;p&gt;For the rare case when you need to debug in a production application:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Add ProcScript
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trigger keyboardSwitch 
if ($logical("SwitchKeyboard") = "debug")
 debug
endif
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Modify Assignment File
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[LOGICALS]
SwitchKeyboard=debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Activate Trigger
&lt;/h3&gt;

&lt;p&gt;Press &lt;strong&gt;GOLD Y&lt;/strong&gt; to start the debugger.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Alternative: The /deb Switch
&lt;/h2&gt;

&lt;p&gt;You can also use the &lt;code&gt;/deb&lt;/code&gt; switch to start the application together with the Debugger. This is particularly useful for systematic debugging from the beginning.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;debug&lt;/code&gt; statement is an indispensable tool for every Uniface developer. It enables you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Step through code line by line&lt;/li&gt;
&lt;li&gt;✅ Inspect variables at runtime&lt;/li&gt;
&lt;li&gt;✅ Use flexible debugging strategies&lt;/li&gt;
&lt;li&gt;✅ Debug both locally and remotely&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;💡 Tip:&lt;/strong&gt; Use conditional debug statements during development and remove them before production for optimal performance!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was created with AI assistance and is based on the official Uniface 10.4 documentation. Do you have questions or additional tips for Uniface debugging? Feel free to share them in the comments! 🚀&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title># 🚀 Uniface call Statement: Executing Functions and ProcScript Modules</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Fri, 11 Jul 2025 20:49:09 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-call-statement-executing-functions-and-procscript-modules-3mkm</link>
      <guid>https://dev.to/zuuwn21/-uniface-call-statement-executing-functions-and-procscript-modules-3mkm</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is based on Uniface 10.4 documentation and was created with AI assistance&lt;/em&gt; 🤖&lt;/p&gt;

&lt;p&gt;As a Uniface developer, you'll inevitably encounter the &lt;code&gt;call&lt;/code&gt; statement - a powerful tool for executing functions and global ProcScript modules. Here's a comprehensive explanation of this essential command! 💡&lt;/p&gt;

&lt;h2&gt;
  
  
  📝 Basic Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;call {Library::}LitFunctionName { ( ArgumentList ) }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;call myFunction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔧 Parameters in Detail
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Library&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Literal&lt;/td&gt;
&lt;td&gt;Library containing the global ProcScript module. If not specified, the default library is used 📚&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LitFunctionName&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Literal&lt;/td&gt;
&lt;td&gt;Name of the module (without quotation marks!)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ArgumentList&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Comma-separated list of arguments. Must match the number and type of parameters defined in the function&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  🔄 Automatic Type Conversion
&lt;/h3&gt;

&lt;p&gt;If the data type of an argument doesn't match the corresponding parameter type, &lt;strong&gt;Uniface automatically attempts to convert&lt;/strong&gt; the data to the proper type. This makes the &lt;code&gt;call&lt;/code&gt; statement quite flexible in handling different data types! 🎯&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Return Values and Status
&lt;/h2&gt;

&lt;h3&gt;
  
  
  $status Values
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;-1&lt;/strong&gt; ❌ Error occurred (details in &lt;code&gt;$procerror&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0&lt;/strong&gt; ⚪ No value assigned or no &lt;code&gt;return&lt;/code&gt; statement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&amp;gt;0&lt;/strong&gt; ✅ Successful return value from the function&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚨 Common Errors in $procerror
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;-1109&lt;/strong&gt; (&lt;code&gt;UPROCERR_FUNCTION&lt;/code&gt;): Function not found&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-1113&lt;/strong&gt; (&lt;code&gt;UPROCERR_PARAMETER&lt;/code&gt;): Invalid parameter name or not defined&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;-1122&lt;/strong&gt; (&lt;code&gt;UPROCERR_NARGUMENTS&lt;/code&gt;): Wrong number of arguments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: When a &lt;code&gt;call&lt;/code&gt; succeeds, &lt;code&gt;$procerror&lt;/code&gt; is typically cleared or contains no error information.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Understanding Parameter Directions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  IN Parameters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accepts&lt;/strong&gt;: Constants, fields, indirect field references, variables, functions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavior&lt;/strong&gt;: Value is transferred to the module's parameter at function start 📥&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  INOUT Parameters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accepts&lt;/strong&gt;: Fields, indirect field references, variables, assignable functions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavior&lt;/strong&gt;: Value is transferred at start AND the function's end value is returned to the original location 🔄&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OUT Parameters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accepts&lt;/strong&gt;: Fields, indirect field references, variables, assignable functions
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavior&lt;/strong&gt;: Only the function's end value is returned to the original location 📤&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: If an error occurs (status = -1), values of OUT and INOUT parameters must be considered &lt;strong&gt;undefined&lt;/strong&gt; in the calling component.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Practical Example from Real Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function LSTORE
    store
    if ($status &amp;lt; 0)
        message "Store error!"
        rollback
    else
        message "Store done."
        commit
    endif
end ; LSTORE

trigger store
    call LSTORE
    return ($status)
end; store

trigger accept
    if ($formdbmod = 1)
        call LSTORE
    endif
    return ($status)
end; accept
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔍 Understanding Module Resolution
&lt;/h2&gt;

&lt;p&gt;Uniface searches for modules in the following order:&lt;/p&gt;

&lt;h3&gt;
  
  
  For Local Functions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local functions&lt;/strong&gt; in the component's triggers&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  For Global ProcScript (when no library specified)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Component library&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Library specified in application shell properties&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SYSTEM_LIBRARY&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  For Global ProcScript (when library specified)
&lt;/h3&gt;

&lt;p&gt;If Uniface cannot find the module in the specified library, it &lt;strong&gt;stops searching&lt;/strong&gt; and returns an error - no fallback to other locations! 🚫&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For detailed information about the search process, refer to the Compilation Process documentation.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Best Practices and Tips
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Do's
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use descriptive function names&lt;/li&gt;
&lt;li&gt;Always check the &lt;code&gt;$status&lt;/code&gt; value after the call&lt;/li&gt;
&lt;li&gt;Match parameter count and types exactly&lt;/li&gt;
&lt;li&gt;Handle potential type conversion scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❌ Don'ts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Don't put LitFunctionName in quotation marks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid returning -1&lt;/strong&gt; from your functions (reserved for system errors)&lt;/li&gt;
&lt;li&gt;Don't ignore parameter direction requirements&lt;/li&gt;
&lt;li&gt;Don't use &lt;code&gt;call&lt;/code&gt; for global ProcScripts in self-contained services/reports&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚠️ Structure Editor Consideration
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: The &lt;code&gt;$status&lt;/code&gt; value can affect how the structure editor behaves when activating trigger sequences. When calling functions in triggers, ensure the returned value doesn't adversely impact the structure editor's operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎪 Availability
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;call&lt;/code&gt; statement is available in &lt;strong&gt;all component types&lt;/strong&gt;! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exception&lt;/strong&gt;: Calling global ProcScript modules is &lt;strong&gt;not allowed&lt;/strong&gt; in self-contained services and reports. 🚫&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;call&lt;/code&gt; statement is an indispensable tool for modular Uniface development. With proper understanding of parameter directions, automatic type conversion, error handling, and module resolution, you can create robust and maintainable applications! &lt;/p&gt;

&lt;p&gt;Understanding these nuances will help you avoid common pitfalls and write more reliable Uniface code.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Do you have questions about Uniface or other development topics? Let me know in the comments!&lt;/em&gt; 💬&lt;/p&gt;

</description>
      <category>procscript</category>
      <category>softwaredevelopment</category>
      <category>documentation</category>
      <category>uniface</category>
    </item>
    <item>
      <title>JSON-to-Struct with Uniface 10.4 jsonToStruct: A Practical Guide 📄⚡</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Fri, 11 Jul 2025 20:09:17 +0000</pubDate>
      <link>https://dev.to/zuuwn21/json-to-struct-with-uniface-104-jsontostruct-a-practical-guide-d62</link>
      <guid>https://dev.to/zuuwn21/json-to-struct-with-uniface-104-jsontostruct-a-practical-guide-d62</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is jsonToStruct? 🤔&lt;/strong&gt;&lt;br&gt;
The jsonToStruct statement in Uniface is a ProcScript function that converts JSON text into a Uniface structure (Struct). This function is particularly valuable when receiving data from web APIs or processing JSON files.&lt;/p&gt;

&lt;p&gt;Basic Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jsonToStruct StructTarget, JsonSource
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Parameters:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;StructTarget:&lt;br&gt;
Variable, parameter, or non-database field to hold the generated structure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JsonSource:&lt;br&gt;
JSON text as string, variable, field, or filename&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practical Example 💻&lt;/strong&gt;&lt;br&gt;
Here's a simple example of how the function is used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;variables
    vStruct : struct
    vJsonText : string
endvariables

vJsonText = '{"name": "John Doe", "age": 30, "skills": ["C#", "Uniface", "SQL"]}'
jsonToStruct vStruct, vJsonText

; Accessing the data
putmess vStruct-&amp;gt;name        ; Output: John Doe
putmess vStruct-&amp;gt;age         ; Output: 30
putmess vStruct-&amp;gt;skills-&amp;gt;{1} ; Output: C#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Understanding JSON Structures 📊&lt;/strong&gt;&lt;br&gt;
JSON can have two main forms:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON Objects&lt;/strong&gt;&lt;br&gt;
Use curly braces { } and contain key-value pairs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "Developer",
  "experience": 5,
  "active": true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Struct members are addressable by name: &lt;code&gt;vStruct-&amp;gt;name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON Arrays&lt;/strong&gt;&lt;br&gt;
Use square brackets [ ] and contain indexed values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;["JavaScript", "Python", "C#", "Uniface"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Array elements are addressable by index: &lt;code&gt;vStruct-&amp;gt;*{1}&lt;/code&gt; (first element)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Type Mappings 🔄&lt;/strong&gt;&lt;br&gt;
Uniface automatically recognizes JSON data types and maps them accordingly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;JSON Type&lt;/th&gt;
&lt;th&gt;Uniface Struct Annotation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;jsonDataType = "string"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;number&lt;/td&gt;
&lt;td&gt;jsonDataType = "number"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;jsonDataType = "boolean"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;jsonDataType = "null"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Error Handling ⚠️&lt;/strong&gt;&lt;br&gt;
The function returns various status codes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;statuc code&lt;/th&gt;
&lt;th&gt;descritption&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Conversion successful&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-4&lt;/td&gt;
&lt;td&gt;File could not be opened&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-13&lt;/td&gt;
&lt;td&gt;Filename too long&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-1900&lt;/td&gt;
&lt;td&gt;JSON string empty or invalid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-1901&lt;/td&gt;
&lt;td&gt;JSON text doesn't start with { or [&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-1902&lt;/td&gt;
&lt;td&gt;Parser error&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jsonToStruct vStruct, vJsonFile

if ($status &amp;lt; 0)
    putmess "Error parsing: " ; $procerror
else
    putmess "JSON successfully converted!"
endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Working with Files 📁&lt;/strong&gt;&lt;br&gt;
The function can also process JSON files directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jsonToStruct vStruct, "data.json"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; The file must be Unicode-encoded. If not, use fileload to first read the file into a variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Features 🔧&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Struct Annotations&lt;/strong&gt;&lt;br&gt;
Uniface automatically adds metadata that provides information about the JSON structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;jsonClass&lt;/em&gt;&lt;/strong&gt;: Type of JSON construction (object or array)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;jsonDataType&lt;/em&gt;&lt;/strong&gt;: Data type of the struct member&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Character Handling&lt;/strong&gt;&lt;br&gt;
During conversion, line breaks are normalized:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;\r&lt;/strong&gt; (Carriage Return) and &lt;strong&gt;\n&lt;/strong&gt; (Linefeed) are converted to &lt;strong&gt;\r&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When converting back with structToJson, CR characters are written as \n&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices 🎯&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Always implement error handling: Check the $status value after each conversion&lt;/li&gt;
&lt;li&gt;Consider file format: Ensure JSON files are Unicode-encoded&lt;/li&gt;
&lt;li&gt;Test complex structures: For nested JSON objects, test access paths beforehand&lt;/li&gt;
&lt;li&gt;Documentation: Comment complex JSON structures for better maintainability&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Comparison with Other Languages 🌐&lt;/strong&gt;&lt;br&gt;
Other programming languages have similar functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/strong&gt;: JSON.parse()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Python&lt;/em&gt;&lt;/strong&gt;: json.loads()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;C#&lt;/em&gt;&lt;/strong&gt;: JsonSerializer.Deserialize()&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What makes Uniface's &lt;strong&gt;jsonToStruct&lt;/strong&gt; special is its seamless integration into the Uniface development environment and automatic struct generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion 🎉&lt;/strong&gt;&lt;br&gt;
The &lt;strong&gt;jsonToStruct&lt;/strong&gt; function is a powerful tool for Uniface developers that significantly simplifies working with JSON data. It offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Simple syntax for quick implementation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatic type recognition for various JSON data types&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Robust error handling for production-ready applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexible data sources (strings, variables, files)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For anyone working with Uniface and needing to process JSON data, this function is definitely worth a closer look. It makes integrating web APIs and processing modern data formats much easier.&lt;/p&gt;

&lt;p&gt;Have you already had experience with &lt;strong&gt;jsonToStruct&lt;/strong&gt;? Share your tips and tricks in the comments! 💬&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Transparency Note: This post was completely generated with AI, based on the Uniface Documentation 10.4. The prompts, ideas, and content direction come from the author to ensure a practical and understandable presentation of the technical concepts.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Uniface Date Functions 101 📅✨</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 09:36:31 +0000</pubDate>
      <link>https://dev.to/zuuwn21/uniface-date-functions-101-37ep</link>
      <guid>https://dev.to/zuuwn21/uniface-date-functions-101-37ep</guid>
      <description>&lt;p&gt;Working with dates is a daily challenge in software development—whether it’s contract durations, deadlines, or recurring billing cycles. Uniface offers several handy functions to make date handling a breeze. In this post, I’ll introduce you to the essential date functions in Uniface, complete with practical examples and tips! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Are Date Functions So Important? 🤔
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process Automation:&lt;/strong&gt; Automatically extend contracts, calculate deadlines, and trigger reminders—all based on dates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Prevention:&lt;/strong&gt; Manual calculations are prone to mistakes. Built-in functions keep your logic safe and reliable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internationalization:&lt;/strong&gt; Handle different date formats and time zones correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Most Important Date Functions in Uniface 🛠️
&lt;/h2&gt;

&lt;p&gt;Uniface provides several built-in functions for date manipulation. Here are the key players:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$date&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Converts a string to a Uniface date&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$datim&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Returns the current date and time in Uniface format&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;addmonths&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds or subtracts months to/from a date&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;$date&lt;/code&gt; – Convert Strings to Date Values 🗓️
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;$date&lt;/code&gt;, you can turn a string like &lt;code&gt;"28-feb-90"&lt;/code&gt; into a real Uniface date value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myDate = $date("28-feb-90")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Always use &lt;code&gt;$date&lt;/code&gt; when working with date strings to avoid formatting issues! 😉&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;$datim&lt;/code&gt; – Get the Current Date and Time ⏰
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;$datim&lt;/code&gt; gives you the current date and time in Uniface format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;currentDateTime = $datim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect for timestamps, logs, or automated calculations.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;addmonths&lt;/code&gt; – Add or Subtract Months ➕➖
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;addmonths&lt;/code&gt; lets you easily add or subtract months from a date. The result is stored in the system variable &lt;code&gt;$result&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;addmonths 1, $date("28-feb-90")
; $result = 28-mar-90
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use negative values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;addmonths -1, $date("28-feb-90")
; $result = 28-jan-90
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Pitfalls and Best Practices ⚠️✅
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Watch Date Formats:&lt;/strong&gt; String interpretation depends on your locale settings. Always use &lt;code&gt;$date&lt;/code&gt;!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month End Handling:&lt;/strong&gt; Without a reference date, month ends may “shift.” Use a reference date to keep patterns consistent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time Zones &amp;amp; Language Settings:&lt;/strong&gt; Different settings can lead to unexpected results.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion 🎉
&lt;/h2&gt;

&lt;p&gt;With Uniface’s date functions, you’re well-equipped to handle even complex date requirements elegantly and reliably. Use &lt;code&gt;$date&lt;/code&gt;, &lt;code&gt;$datim&lt;/code&gt;, and &lt;code&gt;addmonths&lt;/code&gt; to make your applications more robust and flexible!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Curious for more?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In the next post, we’ll dive deeper into the &lt;code&gt;addmonths&lt;/code&gt; function, exploring special cases, best practices, and common pitfalls. Stay tuned! 😎&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What date challenges have you solved in Uniface? Share your experiences in the comments!&lt;/em&gt; 💬&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: I used an AI assistant to help create and review this post.&lt;/em&gt; 🤖&lt;/p&gt;

</description>
      <category>legacy</category>
      <category>beginners</category>
      <category>uniface</category>
    </item>
    <item>
      <title># 🏁 Uniface 10.4: Summary, Best Practices &amp; Resources for the activate Statement</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 09:19:24 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-104-summary-best-practices-resources-for-the-activate-statement-f2i</link>
      <guid>https://dev.to/zuuwn21/-uniface-104-summary-best-practices-resources-for-the-activate-statement-f2i</guid>
      <description>&lt;h2&gt;
  
  
  🎯 Conclusion: activate as the Key to Flexible Uniface Development
&lt;/h2&gt;

&lt;p&gt;The activate statement is the central tool for executing operations on component instances in Uniface. It offers you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility:&lt;/strong&gt; Dynamically call operations synchronously, asynchronously, or statelessly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Control:&lt;/strong&gt; Return values and error codes enable robust error handling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modularity:&lt;/strong&gt; By passing parameters, lists, and entities, you can elegantly model complex scenarios.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏆 Best Practices for activate
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Always check &lt;code&gt;$status&lt;/code&gt; and &lt;code&gt;$procerror&lt;/code&gt;:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This lets you detect errors early and react appropriately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use qualifiers consciously:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Apply &lt;code&gt;/async&lt;/code&gt;, &lt;code&gt;/stateless&lt;/code&gt;, or &lt;code&gt;/list&lt;/code&gt; as needed to achieve the desired execution mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Call operations with variables:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This increases the reusability and flexibility of your code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid negative return values:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In your own operations, avoid returning negative values, as Uniface interprets these as errors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use exception handling:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Utilize try/catch to catch and handle exceptions cleanly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Always check parameters and arguments:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The number and type of arguments must match the declared parameters.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📚 Further Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Uniface 10.4 Documentation:&lt;/strong&gt;
&lt;a href="https://docs.rocketsoftware.com/uniface/104/uniface/" rel="noopener noreferrer"&gt;docs.rocketsoftware.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uniface Community &amp;amp; Forum:&lt;/strong&gt;
&lt;a href="https://community.rocketsoftware.com/" rel="noopener noreferrer"&gt;community.rocketsoftware.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dev.to Tags:&lt;/strong&gt;
#uniface #programming #tutorial #error-handling&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🙌 Thank You &amp;amp; Feedback
&lt;/h2&gt;

&lt;p&gt;I hope these posts help you use activate safely, flexibly, and effectively!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are your experiences with activate? What best practices do you use? Share your tips and questions in the comments!&lt;/strong&gt; 👇&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This series was created with AI support and based on the official Uniface 10.4 documentation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title># ⚡ Uniface 10.4: Advanced activate Examples &amp; Special Cases</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 09:12:06 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-104-advanced-activate-examples-special-cases-1ie3</link>
      <guid>https://dev.to/zuuwn21/-uniface-104-advanced-activate-examples-special-cases-1ie3</guid>
      <description>&lt;h2&gt;
  
  
  🧑‍💻 Complex Usage Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Operations with Variable Names
&lt;/h3&gt;

&lt;p&gt;You can dynamically pass the operation name as a variable:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$vOperation$ = "do_it"
activate "myCptInstance".$vOperation$()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with a local variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vOperation = "do_it"
activate "myCptInstance"."%%vOperation%%%"()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2️⃣ Passing Typed Lists with &lt;code&gt;/list&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;/list&lt;/code&gt;, you can pass multiple parameters as typed lists, e.g., for service operations:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;putitem vInParms, -1, $date(20250101)
putitem vInParms, -1, $number(5)
activate/list "SERV2".ADD_WEEK(vInParms, vOutParms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;After the call, &lt;code&gt;vOutParms&lt;/code&gt; contains the result.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ Working with Entities and Occurrences
&lt;/h3&gt;

&lt;p&gt;You can pass entire entities or occurrences to an operation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setocc "PO_ITEMS", -1
activate "SERV2".TOTAL_LNS("PO_ITEMS")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🖥️ Special Cases &amp;amp; Noteworthy Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Modal Forms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only certain operations can be activated in modal forms.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;EXEC&lt;/code&gt; operation can be started from outside, others mostly only internally.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "MyModalForm"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Executing Operating System Commands
&lt;/h3&gt;

&lt;p&gt;With a special service signature, you can start OS commands via activate:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "OS_SERVICE".COMMAND("dir C:")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Exception Handling
&lt;/h3&gt;

&lt;p&gt;If an activated operation throws an exception, it is propagated to the activate statement.&lt;br&gt;&lt;br&gt;
You can use try/catch to handle errors:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try
    activate "MyCpt".do_it()
catch
    message "Exception: " + $procerror
endtry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📝 Practical Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use variables for operation names to keep your code flexible.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;/stateless&lt;/code&gt;, you can call services statelessly and efficiently.&lt;/li&gt;
&lt;li&gt;Always check &lt;code&gt;$status&lt;/code&gt; and &lt;code&gt;$procerror&lt;/code&gt; after every activate call for robust error handling.&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is based on the official Uniface 10.4 documentation and was created with AI support. For details, see the original documentation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What special cases have you solved with activate? Share your experiences in the comments!&lt;/strong&gt; 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title># 🛡️ Uniface 10.4: Return Values &amp; Error Handling with activate</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 08:56:52 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-104-return-values-error-handling-with-activate-3lnh</link>
      <guid>https://dev.to/zuuwn21/-uniface-104-return-values-error-handling-with-activate-3lnh</guid>
      <description>&lt;h2&gt;
  
  
  📊 Key Return Values
&lt;/h2&gt;

&lt;p&gt;After calling an operation with &lt;code&gt;activate&lt;/code&gt;, Uniface provides return values that help you assess the result and detect any errors.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;$status&lt;/code&gt; – The Main Return Value
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;gt; 0&lt;/code&gt;&lt;/strong&gt;: Successful execution, value returned by the operation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;0&lt;/code&gt;&lt;/strong&gt;: No value assigned or no &lt;code&gt;return&lt;/code&gt; statement present.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt; 0&lt;/code&gt;&lt;/strong&gt;: An error occurred; details are in &lt;code&gt;$procerror&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;9&lt;/code&gt;&lt;/strong&gt;: User exited the form with &lt;code&gt;^ACCEPT&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;10&lt;/code&gt;&lt;/strong&gt;: User exited the form with &lt;code&gt;^QUIT&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "MyCpt".do_it()
if ($status &amp;lt; 0)
    message "Error: " + $procerror
endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🚨 Error Handling with &lt;code&gt;$procerror&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If an error occurs, &lt;code&gt;$procerror&lt;/code&gt; contains a specific error code. The most important codes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Error Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;-50&lt;/td&gt;
&lt;td&gt;Component not found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-59&lt;/td&gt;
&lt;td&gt;Operation not defined&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-1122&lt;/td&gt;
&lt;td&gt;Wrong number of arguments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-155&lt;/td&gt;
&lt;td&gt;Instance could not be created&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;...&lt;/td&gt;
&lt;td&gt;See documentation for more&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "MyCpt".do_it()
if ($status &amp;lt; 0)
    selectcase $procerror
        case -50
            message "Component not found!"
        case -59
            message "Operation does not exist!"
        case -1122
            message "Wrong number of arguments!"
        case else
            message "Unknown error: " + $procerror
    endselectcase
endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧰 Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always check &lt;code&gt;$status&lt;/code&gt; and &lt;code&gt;$procerror&lt;/code&gt;:&lt;/strong&gt;
Evaluate these values after every activate call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provide meaningful error messages:&lt;/strong&gt;
Use error codes to give targeted feedback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid negative return values:&lt;/strong&gt;
In your own operations, avoid returning negative values, as Uniface interprets them as errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🕵️‍♂️ Common Pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wrong arguments:&lt;/strong&gt; Number or type does not match the operation’s parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incorrect instance or operation name:&lt;/strong&gt; Typos lead to -50 or -59.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous calls:&lt;/strong&gt; No OUT/INOUT parameters and no return value with &lt;code&gt;/async&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📝 Example: Robust Error Handling
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "MyService".calculate(100, 200)
if ($status &amp;lt; 0)
message "Error during call: " + $procerror
return
endif
message "Calculation successful! Result: " + $status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is based on the official Uniface 10.4 documentation and was created with AI support. For details, see the original documentation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>pitfalls</category>
      <category>beginners</category>
    </item>
    <item>
      <title># 🏷️ Uniface 10.4: Qualifiers and Parameters of the activate Statement</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 08:39:03 +0000</pubDate>
      <link>https://dev.to/zuuwn21/-uniface-104-qualifiers-and-parameters-of-the-activate-statement-4jma</link>
      <guid>https://dev.to/zuuwn21/-uniface-104-qualifiers-and-parameters-of-the-activate-statement-4jma</guid>
      <description>&lt;h2&gt;
  
  
  🚦 What are Qualifiers in activate?
&lt;/h2&gt;

&lt;p&gt;Qualifiers are optional switches that let you control the behavior of the activate statement. They determine how and in which mode an operation is executed on a component instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overview of the Most Important Qualifiers
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Qualifier&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Passes input and output parameters as typed Uniface lists.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/stateless&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Invokes the operation statelessly (creates a temporary instance that is deleted after execution).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/async&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Executes the operation asynchronously (no OUT/INOUT parameters, no return value).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/sync&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Executes the operation synchronously (default behavior).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate /async "MyCpt".do_it(vArg1, vArg2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;The operation &lt;code&gt;do_it&lt;/code&gt; is called asynchronously.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 The Parameters of the activate Statement in Detail
&lt;/h2&gt;

&lt;p&gt;Every activate statement consists of several components that you can use as needed:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;InstanceName&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Name of the component instance (max. 16 characters). If not found, the instance is created.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OperationName&lt;/td&gt;
&lt;td&gt;Literal&lt;/td&gt;
&lt;td&gt;Name of the operation to execute (e.g., exec, accept, quit, or a named operation).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ArgumentList&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;Comma-separated list of arguments matching the operation's parameters.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  InstanceName
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Specifies on which component instance the operation is executed.&lt;/li&gt;
&lt;li&gt;If the instance does not exist, it is created automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "myCpt"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  OperationName
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Name of the operation to execute.&lt;/li&gt;
&lt;li&gt;Can be specified as a literal or a variable.&lt;/li&gt;
&lt;li&gt;If no name is given, &lt;code&gt;.exec()&lt;/code&gt; is used by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Example (Literal):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "myCptInstance".do_it()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Example (Variable):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$vOperation$ = "do_it"
activate "myCptInstance".$vOperation$()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;p&gt;&lt;code&gt;activate "myCptInstance".do_it()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example (Variable):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$vOperation$ = "do_it"
activate "myCptInstance".$vOperation$()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ArgumentList
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Comma-separated list of values passed to the operation.&lt;/li&gt;
&lt;li&gt;The number and type of arguments must match the operation's declared parameters.&lt;/li&gt;
&lt;li&gt;Uniface automatically converts data types when possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate "myCptInstance".do_it(42, "Test")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📝 Tips for Using Qualifiers and Parameters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;/list&lt;/strong&gt;: Use this qualifier when you want to pass multiple input and output values as lists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/stateless&lt;/strong&gt;: Ideal for one-time, stateless calls—e.g., for services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/async&lt;/strong&gt;: Use asynchronous calls when you don’t need return values and the operation should run independently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parameter passing&lt;/strong&gt;: Make sure the arguments match the number and type of the operation’s declared parameters.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Practical Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Passing Typed Lists with /list
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;putitem vInParms, -1, $date(20250101)
putitem vInParms, -1, $number(5)
activate/list "SERV2".ADD_WEEK(vInParms, vOutParms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: This post was created with AI support and based on the official Uniface 10.4 documentation. For further details, please refer to the original documentation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Do you have questions or your own tips about qualifiers and parameters? Share them in the comments!&lt;/strong&gt; 👇&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ Stateless Call with /stateless
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate /stateless "MyService".calculate(100, 200)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3️⃣ Asynchronous Call
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate /async "MyCpt".start_long_task()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>uniface</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>documentation</category>
    </item>
    <item>
      <title>🚀 Uniface 10.4: Introduction to the activate Statement</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 06 Jul 2025 04:42:13 +0000</pubDate>
      <link>https://dev.to/zuuwn21/uniface-104-introduction-to-the-activate-statement-2i5j</link>
      <guid>https://dev.to/zuuwn21/uniface-104-introduction-to-the-activate-statement-2i5j</guid>
      <description>&lt;p&gt;✨ What is the activate Statement?&lt;br&gt;
The activate statement is a central element in Uniface for executing operations on component instances. It allows you to specifically call functions (operations) of a component at runtime—whether synchronously, asynchronously, stateless, or with special parameters.&lt;/p&gt;

&lt;p&gt;Whether you want to start a form, call a service, or exchange data between components: activate is the key to flexible and dynamic control of your Uniface applications.&lt;/p&gt;

&lt;p&gt;🛠️ Basic Syntax&lt;br&gt;
The syntax of activate is flexible and powerful. Here is the basic pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;activate {/list | /sync | /async} { /stateless}
InstanceName{.OperationName (ArgumentList)}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;InstanceName: Name of the component instance on which the operation is executed.&lt;/p&gt;

&lt;p&gt;OperationName (optional): Name of the operation to be executed. If nothing is specified, .exec() is used by default.&lt;/p&gt;

&lt;p&gt;ArgumentList (optional): Comma-separated list of arguments for the operation.&lt;/p&gt;

&lt;p&gt;📦 Simple Practical Examples&lt;br&gt;
1️⃣ Execute the Standard Operation on a Component&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;activate "MyCpt1"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Starts the standard operation (exec) of the component MyCpt1. If the instance does not yet exist, it is automatically created.&lt;/p&gt;

&lt;p&gt;2️⃣ Call a Specific Operation with Parameters&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;activate "MyCpt1".do_it(42, "Test")&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Calls the operation do_it on the instance MyCpt1 with the parameters 42 and "Test".&lt;/p&gt;

&lt;p&gt;3️⃣ Instance is Automatically Created&lt;br&gt;
If you address an instance with activate that does not yet exist, it is automatically created—without the need for an explicit newinstance command. This makes activate especially flexible and easy to use.&lt;/p&gt;

&lt;p&gt;🧑‍💻 When and Why Should You Use activate?&lt;br&gt;
Dynamically Start Components: You can flexibly call components and their operations at runtime.&lt;/p&gt;

&lt;p&gt;Parameter Passing: Arguments can be specifically passed to operations.&lt;/p&gt;

&lt;p&gt;Automatic Instance Creation: No separate newinstance needed; activate handles this for you.&lt;/p&gt;

&lt;p&gt;Error Handling: You can respond to the result of the operation via return values and error codes.&lt;/p&gt;

&lt;p&gt;Note: This post was created with the support of AI and based on the official Uniface 10.4 documentation. For further details, please refer to the original documentation.&lt;/p&gt;

&lt;p&gt;Questions, suggestions, or your own activate tips? Feel free to share them in the comments! 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Uniface: How to Display a Simple Message in a Window 😊</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Sun, 29 Jun 2025 09:45:59 +0000</pubDate>
      <link>https://dev.to/zuuwn21/uniface-how-to-display-a-simple-message-in-a-window-3jdd</link>
      <guid>https://dev.to/zuuwn21/uniface-how-to-display-a-simple-message-in-a-window-3jdd</guid>
      <description>&lt;p&gt;Hello everyone! 👋&lt;/p&gt;

&lt;p&gt;Today I want to share a small but useful tip from my work with Uniface. Maybe you’ve encountered this situation: you want to display a message in a window when starting a service—for example, to greet the user or provide important information.&lt;/p&gt;

&lt;p&gt;After some experimenting, I found out how to do this easily! 🛠️&lt;/p&gt;

&lt;p&gt;The Code: It’s That Simple!&lt;br&gt;
Uniface allows you to display a message in an operation. The Init operation is always executed first when a service starts. That’s exactly where I added the following line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public Operation Init

  askmess "Hello World"

end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuqxune66ag5r7gtp9ab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuqxune66ag5r7gtp9ab.png" alt=" " width="226" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the askmess command (which means “ask message”), you can display a message dialog without much effort. In my example, “Hello World” appears when the service starts—but of course, you can use any text you like. 😃&lt;/p&gt;

&lt;p&gt;Why Is This Useful?&lt;br&gt;
Especially during development or testing, it’s helpful to get immediate feedback when a service starts. This way, you instantly know that the service was initialized correctly—or you can provide important information to the user.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Sometimes it’s the little things that make a developer’s life easier. I hope this tip helps you as much as it helped me! 👍&lt;/p&gt;

&lt;p&gt;PS:&lt;br&gt;
I created this blog post with the help of an AI (artificial intelligence). That way, I can share interesting content with you even faster and more efficiently! 🤖&lt;/p&gt;

</description>
      <category>uniface</category>
      <category>programming</category>
    </item>
    <item>
      <title>Uniface for Beginners: How to Properly Define Numeric Parameters</title>
      <dc:creator>zuUwn21</dc:creator>
      <pubDate>Tue, 20 May 2025 06:08:53 +0000</pubDate>
      <link>https://dev.to/zuuwn21/uniface-for-beginners-how-to-properly-define-numeric-parameters-509h</link>
      <guid>https://dev.to/zuuwn21/uniface-for-beginners-how-to-properly-define-numeric-parameters-509h</guid>
      <description>&lt;p&gt;Hello together,&lt;/p&gt;

&lt;p&gt;During my search with the AI Perplexity, I did not find good results to determine how to specify a number as a parameter or as a variable in Uniface. Although there is Uniface documentation [1] on this, it was not found. I do not understand why the AI cannot find the definition of a number in Uniface, even though there is a source for this.&lt;/p&gt;

&lt;p&gt;To make the best of it, I decided to write down my thoughts here. I do not consider myself a Uniface Senior or some kind of specialist in Uniface but rather as a beginner in this programming language.&lt;br&gt;
In the past, when I had questions about a problem with a programming language like Java or C#, I used the search engine Google. Currently, due to the hype around ChatGPT, I use more of an AI like ChatGPT or Perplexity. Unfortunately, both provide me with rarely good results for the programming language Uniface, as there is too little source code and too few contributions on the internet about this.&lt;/p&gt;

&lt;p&gt;Regarding the question of how to represent a number in Uniface, the answer is the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;params&lt;br&gt;
numeric pPrice, pQuantity, pTotal : IN&lt;br&gt;
endparams&lt;br&gt;
pTotal = pPrice * pQuantity&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Taken from the documentation of Uniface.&lt;/p&gt;

&lt;p&gt;I hope I could help you a little bit with this problem and share my thoughts with you to show that you might not be the only one with this problem.&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://docs.rocketsoftware.com/de-DE/bundle/uniface_104/page/yeo1699862389212.html" rel="noopener noreferrer"&gt;https://docs.rocketsoftware.com/de-DE/bundle/uniface_104/page/yeo1699862389212.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>uniface</category>
      <category>programming</category>
      <category>beginners</category>
      <category>parameters</category>
    </item>
  </channel>
</rss>
