Zum Hauptinhalt springen
IT Security NachrichtenDeepfakes & Voice Cloning: Ist Ihre Identitätsprüfung noch sicher?(05.10.2026 um 06:02 Uhr)
•••
Sicherheitslücken (CVE)Apple schließt ausgenutzte iOS-Schwachstelle(05.10.2026 um 07:00 Uhr)
•
IT NachrichtenToday’s NYT Mini Crossword Answers for Monday, Oct. 5(05.10.2026 um 06:29 Uhr)
•••••
IT NachrichtenDeutsche Bahn führt Familienticket dauerhaft ein(05.10.2026 um 07:03 Uhr)
•
IT Security NachrichtenDeepfakes & Voice Cloning: Ist Ihre Identitätsprüfung noch sicher?(05.10.2026 um 06:02 Uhr)
•••
Sicherheitslücken (CVE)Apple schließt ausgenutzte iOS-Schwachstelle(05.10.2026 um 07:00 Uhr)
•
IT NachrichtenToday’s NYT Mini Crossword Answers for Monday, Oct. 5(05.10.2026 um 06:29 Uhr)
•••••
IT NachrichtenDeutsche Bahn führt Familienticket dauerhaft ein(05.10.2026 um 07:03 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Understanding $subsetreturn in Uniface 10.4 🚀

Note: This blog post was created with AI assistance. 🤖 If you're working with Uniface 10.4, you might have encountered situations where you need to retrieve sp…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

Note: This blog post was created with AI assistance. 🤖



If you're working with Uniface 10.4, you might have encountered situations where you need to retrieve specific data from your database. Today, we'll look at a powerful function called $subsetreturn that helps you work more efficiently with entity data.






What is $subsetreturn? 🤔



In simple terms, $subsetreturn is a function that returns only the most recently retrieved occurrences of an entity. Normally, when you work with entity parameters in Uniface operations, you get all occurrences. But sometimes, you only want the data you just fetched from the database.



Think of it like this: imagine you have a huge filing cabinet with customer records. Usually, when you ask for customer files, you get the entire drawer. But with $subsetreturn, you only get the specific files you just pulled out. 📁






When Should You Use It? 💡



$subsetreturn is especially useful when you're using the retrieve/a command. This command lets you retrieve multiple occurrences based on specific criteria. After retrieving these occurrences, $subsetreturn ensures that only these newly retrieved records are passed to your entity parameter.



Important: Any occurrences that were removed from the hitlist or deleted from the database will not be returned. This keeps your data clean and relevant. ✨






Where Can You Use It? 📍



You can use $subsetreturn in:




  • Form components

  • Report components

  • Service components



It must be used in an operation that has an entity parameter with direction OUT or INOUT.






A Practical Example 🎯



Let's say you want to retrieve all customers from the USA and return only those records. Here's how you would do it:




operation GET_USA_CUSTOMERS
params
entity CUSTOMER : OUT
endparams
creocc "CUSTOMER", 0
retrieve/a "CUSTOMER"
set $subsetreturn
end ; GET_USA_CUSTOMERS






Let's break down what happens here:




  1. Create operation: We define an operation called GET_USA_CUSTOMERS with an output parameter for the CUSTOMER entity.

  2. Clear occurrences: The creocc command clears any existing customer occurrences.

  3. Retrieve data: The retrieve/a command fetches customers based on your criteria (presumably USA customers through a retrieve profile).

  4. Set subset return: The set $subsetreturn ensures only these newly retrieved USA customers are returned to the calling component.






How to Use It 🛠️



The syntax is straightforward:




set $subsetreturn(Entity)






You can also reset it when you're done:




reset $subsetreturn(Entity)






If you want to check how many occurrences will be returned, you can read the value:




NumOccurrences = $subsetreturn(Entity)






If $subsetreturn is not enabled, this will return 0.






Error Handling ⚠️



Like any good function, $subsetreturn provides error information through $procerror. Common errors include:




  • Invalid entity name: The entity you specified doesn't exist or isn't painted on the component.

  • Invalid parameter: The parameter name isn't valid or defined.






Why It Matters 🎓



$subsetreturn gives you precise control over what data flows through your operations. This is crucial for:




  • Performance optimization (sending only necessary data)

  • Cleaner code architecture

  • Better separation of concerns in your application

  • More predictable data handling






Key Takeaways 📝



Remember these important points:




  • $subsetreturn returns only recently retrieved occurrences

  • Works best with retrieve/a operations

  • Deleted or removed occurrences are automatically excluded

  • Use it in Form, Report, and Service components

  • Requires OUT or INOUT entity parameters



By understanding and using $subsetreturn effectively, you can build more efficient and maintainable Uniface applications. Happy coding! 💻✨

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Understanding $subsetreturn in Uniface 10.4 🚀

Thematisch verwandte Begriffe: Understanding, subsetreturn, Uniface · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Nächster Beitrag