KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Updating SET PROCESS VARIABLE When Replacing Interprocess Variables
PRODUCT: 4D | VERSION: 21 | PLATFORM: Mac & Win
Published On: March 12, 2026
When migrating away from Interprocess Variables (IP Vars), one important area to review is any code that uses SET PROCESS VARIABLE to synchronize values between the server and client. Because IP Vars behave differently from modern shared mechanisms, two parts of the logic often require updates if not aiming for a major rewrite.
  1. Updating How Values Are Shared Between Processes
    If IP Vars are being replaced with Storage, Shared Objects, or a Singleton, the code must be updated so that values are passed explicitly between process variables rather than relying on the implicit synchronization that IP Vars provided. Each process now needs to read from and write to the shared structure directly.

  2. 2. Updating Logic That Depends on Process Numbers
    Older documentation for SET PROCESS VARIABLE recommended using a negative process number to interact with the server’s IP Vars. When replacing this pattern with modern process variables or shared structures, the logic must be updated to reference the actual process involved.
    Because shared structures do not automatically synchronize timing between processes, both processes must allow time for each other to read and write values. This often requires implementing a simple coordination mechanism, such as a shared flag combined with a loop that waits until the other process has completed its update.