Returns the caption of the target or source member used in a cross-model interaction
- Returned Output: Text
- Library: PQL \ Action \ Cross-Model
- Version: 2018.00.000
- Compatibility: Any content (regardless of data source) in the relevant parts of the application
- The function returns the caption of the designated member object in the interaction.
- The function can only be used together with the SourceMember and TargetMember functions.
The examples below shows how the functions can be sued for cross-model interactions.
A model "map" called defined to run from the data points or cells one query written against model "SampleDemo" to another query written against model "New Sample". The designer has decided to map the hierarchy "dateKey" in SampleDemo to "Dates" in New Demo. If the members in each hierarchy were identically named, except for the table/dimension and the column/hierarchy, they could use the 'simple' mapping option. However, in more complex scenarios, the names need to be dynamically transformed using the advanced formulations and shown below.
The designer needs to swap out both the table/dimension name and the column/hierarchy name. It also turns out that the member names in one model are titled "2018-Jan" and "Jan 2018" .in the other. Notice the use of the sourceMember function with the member caption function.
"[transactions].[Dates].[" + SubString(sourceMember().memberCaption(),IndexOf(sourceMember().memberCaption()," "),10) + " " + Left(sourceMember().memberCaption(),4) + "]"
"[data].[dateKey].[" + SubString(sourceMember().memberCaption(),IndexOf(sourceMember().memberCaption()," "),4) + "-" + SubString(sourceMember().memberCaption(),5,10) + "]"