Virtual File Accessor (VFA) Considerations
|
|
 |
Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Virtual File Accessor Considerations
Virtual File Accessor (VFA) Considerations
When using Virtual File Accessors (VFA), be aware of the following constraints that may impact data retrieval and behaviour:
Overlapping Keys and Unexpected Behaviour
-
Missing Values in Outer Joins
- If multiple constituent files share the same file variable, PROIV does not distinguish them like SQL does with table aliases.
- In an outer join, if a later file has no matching records, shared file variables may appear empty, even if values exist in an earlier file.
- Workaround: Define child files with unique file variable names to prevent value loss.
-
Loss of Key Status in Overlapping Fields
- If a field is a key in one file but overlaps with a non-key in a later file, it will be treated as a non-key in the VFA.
- This can affect sorting, indexing, and data retrieval performance.
- Workaround: Consider renaming overlapping fields in later files or restructuring file definitions.
Best Practices
- Always check how overlapping keys affect joins and indexing in your VFA setup.
- If retaining key status is important, adjust file structures to avoid conflicts.
- If outer joins are involved, test whether shared variables behave as expected across files.
Related Topics
Document Function File Accessor
Report Function File Accessor
Screen Function File Accessor
Update Function File Accessor
SQL Where Clause
SQL Where Clause Behaviour on Secondary File(s)
Virtual File Accessor
Virtual File Accessor Advanced Operators
Virtual File Accessor Conventions and Limitations
Comment on this topic
Topic ID: 520204