Test-ParserFunctions-in-ExternalData: Difference between revisions
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
Testing will continue but for the immediate future, we have found that using the Display_External_Table format option does work. This option requires the creation of a template for each query and the presence of variable names in both the wiki page and the template makes maintenance somewhat confusing. | Testing will continue but for the immediate future, we have found that using the Display_External_Table format option does work. This option requires the creation of a template for each query and the presence of variable names in both the wiki page and the template makes maintenance somewhat confusing. | ||
<!-- | |||
=== Test Case: === | === Test Case: === | ||
| Line 17: | Line 18: | ||
==== Test Ifeq & Ifexist Outside ExternalData call, with no variables: ==== | ==== Test Ifeq & Ifexist Outside ExternalData call, with no variables: ==== | ||
| Line 24: | Line 25: | ||
Test IfExist: Result is.... {{#ifexist: User:Mharrit1 | Mharrit1 User Page Exists | No User Page]]}} | Test IfExist: Result is.... {{#ifexist: User:Mharrit1 | Mharrit1 User Page Exists | No User Page]]}} | ||
| Line 88: | Line 89: | ||
{{ManagerDataNoTable}} | {{ManagerDataNoTable}} | ||
--> | |||
Latest revision as of 21:40, 28 September 2026
Testing combined use of GetExternalData and ParserFunctions extensions
This page was created to test a variety of methods for combining the functionality of the GetExternalData extension with the ParserFunctions extension. Initial attempts to use the two extensions together failed. Though the documentation isn't entirely clear, it appears that since both extensions use the MediaWiki template functionality (using curly braces "{ }" that there is some incompatibility.
The reason we need to use ParserFunction extension is to allow us to make minor changes of the data imported by GetExternalData. For example, the data contains a column named 'Role' that describes the person's role, whether they are a Manager, Staff, or Advisor. Managers are unpaid volunteers while Staff and Advisers are paid. Using ParserFunction conditionals we can group Staff and Advisers together under the label 'Non Volunteer' while Managers are labelled 'Volunteer'
Another important reason for conditional testing relates to the need to handle a field differently for different rows. For example, not all Managers have created a user page. We don't keep track of this in the spreadsheet. When we create a link to the user page for each Manager, we can test for the existence of that page and not create a link if the page doesn;t exist.
Testing will continue but for the immediate future, we have found that using the Display_External_Table format option does work. This option requires the creation of a template for each query and the presence of variable names in both the wiki page and the template makes maintenance somewhat confusing.