Your Knowledge Base is moving on 3/25/24! Our new Help Center provides all the articles you know and love (plus so much more) in a one-stop shop. Ask your SPoC for details!

Editing Fields

 

The following instructions are for SPoCs. If you're not the SPoC but have needs along the lines of this post, get in touch with your SPoC and they can assist.

Default Field List

This is the list of fields that show on a page's data grid when you are viewing the All Records view on a page. The default field list is also used for many other views on a page, so just because you aren't looking at All Records doesn't mean you aren't still seeing the default field list.

Finding the Default Field List of a Page:

  1. Go to System Setup > Pages.
  2. Open the Page record you want.
  3. Click Edit to see a more readable view of the field list.

There are some basic observations you can make. First, to most people, the field list is daunting just because it's not quite plain English, but not completely foreign. Don't let it scare you - it's not as complicated as it appears. Regardless, you should be able to look at the end of each line and figure out which line relates to which column on the page view.

Editing Fields

Note: This is NOT referring to editing fields in SQL Server. For that, see Custom Fields. You can always add custom fields; however, you cannot change system field names.

Now you know where your default field list is. So, how do you add fields to that list? Here's your answer!

  1. Go to the page you want to adjust and open the Views/Advanced Search tool.
  2. Find and add the fields that are missing from your default field list.
  3. Click the SQL View tab.
  4. Before you copy the list, add a comma (,) before the first field you have listed.
  5. Copy the field list, and paste it into a separate text editor (notepad is fine).
  6. Go to System Setup > Pages, and open the Page you want.
  7. Paste the field list at the bottom of the existing field list. You may need to insert a carriage return after the last field of the initial field list to make everything look good.
  8. Click Save.
  9. Go to the Page in the normal menu, and refresh to make sure everything functions as expected.

Congrats! At this point, you should see the new fields added after the old fields. Re-ordering fields is as simple as cutting and pasting the list of fields in the setup area.

Note: MinistryPlatform has a safeguard that protects against attempts to circumvent security and other suspicious activity. For example, you may notice certain issues if you try to include a subquery in an API request. In these cases, you'll see an error message that provides more information.

Renaming Fields (Field Aliases)

Sometimes the name of a field isn't ideal for your specific needs. Perhaps it's too generic (Display_Name), or perhaps you just need to edit a field name so it can be used with the New Message Tool as a merge field. Whatever the need is, here's what to do:

  1. Edit the Page you're looking for, and find the Default Field List.
  2. Read over the field list, and find the specific field you want to rename.
  3. Add " AS [New_Field_Name]" after the field's existing syntax, where "new_field_name" is your new field name. Underscore characters are translated to spaces by MinistryPlatform.

Example:

,Form_Responses.[First_Name]
,Form_Responses.[First_Name] AS [Web_First_Name]