The mobile app’s Bible Reader is picky about book names. It resolves “Psalms” but not “Psalm” — one character off and the passage won’t load. So if your content channel items store the book as free text, a single typo or an inconsistent abbreviation quietly breaks the reader for that item, and nobody finds out until someone taps it and gets nothing.

A Defined Type holding all 66 books, spelled the way the Bible Reader expects, fixes that at the source. Staff pick the book from a dropdown instead of typing it, every content channel item references a string the app will actually resolve, and your reading plans, verse-of-the-day, and devotionals stay reliable. Consistent naming also keeps your sorting, filtering, and display predictable as a side benefit.

Entering all 66 by hand is tedious, so this recipe creates them with one SQL script.

Note: This writes straight to the database with SQL. 

Steps

  1. Create the Defined Type. Admin Tools > Settings > Defined Types > add a new one. Name it something like “Bible Books” and save.
  2. Copy its Id. Open the new Defined Type and grab the Id from the URL (the DefinedTypeId= number).
  3. Open your SQL editor and paste in the script below
  4. Set the Id. Change the top line, @DefinedTypeId = 0, to the Id you copied.
  5. Run it. All 66 books land in the Defined Type in canonical order.
  6. Add a Defined Value attribute on your content channel item type (or wherever you build the reference the Bible Reader uses) and point it at the “Bible Books” Defined Type.
  7. Check “Enhance For Long Lists” in that attribute’s settings. With 66 options, it turns the plain dropdown into a searchable one, so staff type “Rom” and jump to Romans instead of scrolling the whole list.

Script

DECLARE @DefinedTypeId INT = 0;   -- <-- put your Defined Type Id here

/* --- Safety check: the Defined Type must exist ----------------------------- */
IF NOT EXISTS (SELECT 1 FROM [DefinedType] WHERE [Id] = @DefinedTypeId)
BEGIN
RAISERROR('No DefinedType found with Id %d. Set @DefinedTypeId to a valid value.', 16, 1, @DefinedTypeId);
RETURN;
END

/* --- Continue the display order after whatever is already in this type ------ */
DECLARE @StartOrder INT =
ISNULL((SELECT MAX([Order]) FROM [DefinedValue] WHERE [DefinedTypeId] = @DefinedTypeId), -1) + 1;

/* --- The 66 books, in canonical order -------------------------------------- */
;WITH Books ([Seq], [Value]) AS (
SELECT * FROM (VALUES
-- Old Testament (39)
( 1, N'Genesis'), ( 2, N'Exodus'), ( 3, N'Leviticus'),
( 4, N'Numbers'), ( 5, N'Deuteronomy'), ( 6, N'Joshua'),
( 7, N'Judges'), ( 8, N'Ruth'), ( 9, N'1 Samuel'),
(10, N'2 Samuel'), (11, N'1 Kings'), (12, N'2 Kings'),
(13, N'1 Chronicles'), (14, N'2 Chronicles'), (15, N'Ezra'),
(16, N'Nehemiah'), (17, N'Esther'), (18, N'Job'),
(19, N'Psalms'), (20, N'Proverbs'), (21, N'Ecclesiastes'),
(22, N'Song of Solomon'), (23, N'Isaiah'), (24, N'Jeremiah'),
(25, N'Lamentations'), (26, N'Ezekiel'), (27, N'Daniel'),
(28, N'Hosea'), (29, N'Joel'), (30, N'Amos'),
(31, N'Obadiah'), (32, N'Jonah'), (33, N'Micah'),
(34, N'Nahum'), (35, N'Habakkuk'), (36, N'Zephaniah'),
(37, N'Haggai'), (38, N'Zechariah'), (39, N'Malachi'),
-- New Testament (27)
(40, N'Matthew'), (41, N'Mark'), (42, N'Luke'),
(43, N'John'), (44, N'Acts'), (45, N'Romans'),
(46, N'1 Corinthians'), (47, N'2 Corinthians'), (48, N'Galatians'),
(49, N'Ephesians'), (50, N'Philippians'), (51, N'Colossians'),
(52, N'1 Thessalonians'), (53, N'2 Thessalonians'), (54, N'1 Timothy'),
(55, N'2 Timothy'), (56, N'Titus'), (57, N'Philemon'),
(58, N'Hebrews'), (59, N'James'), (60, N'1 Peter'),
(61, N'2 Peter'), (62, N'1 John'), (63, N'2 John'),
(64, N'3 John'), (65, N'Jude'), (66, N'Revelation')
) AS b ([Seq], [Value])
)
INSERT INTO [DefinedValue]
( [IsSystem], [DefinedTypeId], [Order], [Value], [Description], [IsActive], [Guid], [CreatedDateTime] )
SELECT
0,
@DefinedTypeId,
@StartOrder + (ROW_NUMBER() OVER (ORDER BY b.[Seq]) - 1),
b.[Value],
NULL,
1,
NEWID(),
dbo.RockGetDate()
FROM Books b
WHERE NOT EXISTS (
SELECT 1
FROM [DefinedValue] dv
WHERE dv.[DefinedTypeId] = @DefinedTypeId
AND dv.[Value] = b.[Value]
);

PRINT CONCAT(@@ROWCOUNT, ' book(s) added to DefinedType ', @DefinedTypeId, '.');