-> (Dynamic Rename)
Documentation | Blog | Demos | Support
-> (Dynamic Rename)
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
-> (Dynamic Rename)
Renames a component of the set specification in the main command.
A set specification can consist of one or more components. When you create a result set, the structure of that set reflects the component names or role names found in the original set specification.
To use a result set in a subsequent command and have a component of the set used in a different role, the symbol combination (“->”, that is, dynamic rename) enables you to rename the component in question.
Syntax
objname (oldcomponentname -> newcomponentname)
where
objname | The name of a set, an EntitySet, a relationship, or a role. There must be at least one component in objname. |
oldcomponentname | The existing name of a component in objname. |
newcomponentname | The new name to be given to the specified component of objname. |
Comments
When creating a result set, the structure of that set reflects the component names or role names found in the original set specification.
If you want to use the result set in a subsequent command, and you want a component of the set to be used in a different role, dynamic rename (->) enables you to rename the component.
The indicator renames a component of the set specification in the main command.
Oldcomponentname and newcomponentname must both refer to the same underlying object.
Examples
If EntitySet Employees also has a role called Managers, dynamic renaming can be used as shown in the following two examples.
find Employees WorkFor Managers where LName = Smith keep Employees -> set1 find Employees WorkFor set1 (Employees -> Managers) keep Employees -> set1
In the second command, the usage of the only component of set1 is dynamically changed from Employees to Managers.
find Managers -> MSet while find MSet (Managers -> Employees) WorkFor Managers keep Managers if $setcount > 0 find -> MSet else break endif endwhile list all MSet
In a loop, each usage of the Managers component of MSet is dynamically renamed to Employees to select the top managers from an EntitySet of employees.
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |