-3

Sample Google Sheet here

By adapting the answer from @player0 to How can I combine a Google Sheets query formula with arrayFormula formulas?, I have this query:

=INDEX(LAMBDA(x, y, {y; IFERROR(HLOOKUP(y, x, SEQUENCE(COUNTA(QUERY(x, "offset 1", )), 1, 2), ))}) (QUERY(INPUT!A1:K, "select A, max(G), H where C = '7e053706-1f2b-4397-bf80-b345671d22c10' and I = 'Pilot' group by A, H pivot D", 1), {"Instance Id", IFERROR(VLOOKUP(SEQUENCE(1, 9, 7), {TABLE_CONFIG!C2:C, TABLE_CONFIG!F2:F }, 2, )), "File Id"}))

which uses data from the 'INPUT' sheet: (sorry about the length, I understand that query determines the most common value format, so I wanted to provide a representative data set)

Instance Id Section Name Section Id Field name Section field Id Type Value File Id Role Input Item Id Value
Instance_A For 1a224188-8bed-4f5c-b731-32b98f4290b6 For 28 pip 5B77725B43E4-Ee18-7E04-450C-6F322F4A BOOLEAN FALSE Co-Pilot_File Co-Pilot 5B77725B43E4-Ee18-7E04-450C-6F322F4AInstance_A FALSE
Instance_A For 1a224188-8bed-4f5c-b731-32b98f4290b6 For 28 E 95Bfe351F32E-E689-22B4-2C4E-D2453D2B BOOLEAN FALSE Co-Pilot_File Co-Pilot 95Bfe351F32E-E689-22B4-2C4E-D2453D2BInstance_A FALSE
Instance_A For 1a224188-8bed-4f5c-b731-32b98f4290b6 For 16 8Abb0E9D730A-776B-E714-9B6C-6449Ba3E CURRENCY 2300 Co-Pilot_File Co-Pilot 8Abb0E9D730A-776B-E714-9B6C-6449Ba3EInstance_A 2300
Instance_A For 1a224188-8bed-4f5c-b731-32b98f4290b6 For 18 C38Eec9Df1C4-0A98-30C4-2A20-6222F429 CURRENCY 700 Co-Pilot_File Co-Pilot C38Eec9Df1C4-0A98-30C4-2A20-6222F429Instance_A 700
Instance_A For 1a224188-8bed-4f5c-b731-32b98f4290b6 For 28 ceep 14D14Bcbc72E-C8B9-04E4-Fd45-9Be7Fe3F BOOLEAN FALSE Co-Pilot_File Co-Pilot 14D14Bcbc72E-C8B9-04E4-Fd45-9Be7Fe3FInstance_A FALSE
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH principal 16Ca8308B756-F909-E244-5802-019F647A PICKLIST Yes Pilot_File Pilot 16Ca8308B756-F909-E244-5802-019F647AInstance_1 Yes
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH type 4D5B56E0C54F-Be2A-14C4-9Bc9-4D769865 PICKLIST unit Pilot_File Pilot 4D5B56E0C54F-Be2A-14C4-9Bc9-4D769865Instance_1 unit
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH this year 6C80F9B3B190-01F8-8Ec4-944A-2323101C PICKLIST Yes Pilot_File Pilot 6C80F9B3B190-01F8-8Ec4-944A-2323101CInstance_1 Yes
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH address Dafc339Ad2Af-08Fa-4094-B111-38Cfc989 PICKLIST Use mail Pilot_File Pilot Dafc339Ad2Af-08Fa-4094-B111-38Cfc989Instance_1 Use mail
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH who 6A42F461F7Bc-0F68-4444-495A-F7Dce6E4 PICKLIST me and co-pilot Pilot_File Pilot 6A42F461F7Bc-0F68-4444-495A-F7Dce6E4Instance_1 me and co-pilot
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH better Da468Ed1C38C-7029-8924-1507-Eefe2F97 PICKLIST Yes Pilot_File Pilot Da468Ed1C38C-7029-8924-1507-Eefe2F97Instance_1 Yes
Instance_1 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH disable 33Ab5D3F22B9-Ae5A-2634-0Ffa-4E437000 PICKLIST Yes Pilot_File Pilot 33Ab5D3F22B9-Ae5A-2634-0Ffa-4E437000Instance_1 Yes
Instance_1 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Sine Af5A56026066-6A38-F924-4B68-A5495366 STRING 333333333 Pilot_File Pilot Af5A56026066-6A38-F924-4B68-A5495366Instance_1 333333333
Instance_1 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Outer 369D5E00925B-60Cb-7924-D0Eb-7B10F916 PICKLIST Yes Pilot_File Pilot 369D5E00925B-60Cb-7924-D0Eb-7B10F916Instance_1 Yes
Instance_1 Status 96f925f0-1f47-400c-8985-8264ce8480d5 Marstat 98F8D8Df15Cf-3C5B-1224-B985-46Fc8Dc0 PICKLIST Mar Pilot_File Pilot 98F8D8Df15Cf-3C5B-1224-B985-46Fc8Dc0Instance_1 Mar
Instance_1 Arriving de578083-7194-4844-ac64-82c16d3c0d1a To A1Ddbb67C6Ed-31C9-A434-5Bf2-1A81Eef4 PICKLIST No Pilot_File Pilot A1Ddbb67C6Ed-31C9-A434-5Bf2-1A81Eef4Instance_1 No
Instance_1 Arriving de578083-7194-4844-ac64-82c16d3c0d1a Away Bf7Ecaaa2397-E398-Cfe4-F9B0-136E325F PICKLIST No Pilot_File Pilot Bf7Ecaaa2397-E398-Cfe4-F9B0-136E325FInstance_1 No
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam O B5A76D33Ae9E-F5Ca-A554-2D13-4Bd03692 BOOLEAN FALSE Pilot_File Pilot B5A76D33Ae9E-F5Ca-A554-2D13-4Bd03692Instance_1 FALSE
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam child Dd4028Face79-2258-Eb14-F8F8-1D722Fa8 BOOLEAN FALSE Pilot_File Pilot Dd4028Face79-2258-Eb14-F8F8-1D722Fa8Instance_1 FALSE
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam full 399F13943444-Dc4A-2Fd4-F73E-0877E29C BOOLEAN FALSE Pilot_File Pilot 399F13943444-Dc4A-2Fd4-F73E-0877E29CInstance_1 FALSE
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam don 1540E97B2Bf2-8C4B-4F94-258C-Da495D11 BOOLEAN TRUE Pilot_File Pilot 1540E97B2Bf2-8C4B-4F94-258C-Da495D11Instance_1 TRUE
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam half 76Db2B73D7Ee-Dcca-A214-A46D-E2197Eb9 BOOLEAN TRUE Pilot_File Pilot 76Db2B73D7Ee-Dcca-A214-A46D-E2197Eb9Instance_1 TRUE
Instance_1 Eligibility 797066f6-ef67-4b12-abcb-827a46b3ef88 Officer A1F459120021-Bca9-8Ae4-3531-9B94E358 BOOLEAN FALSE Pilot_File Pilot A1F459120021-Bca9-8Ae4-3531-9B94E358Instance_1 FALSE
Instance_1 Eligibility 797066f6-ef67-4b12-abcb-827a46b3ef88 Confin 5De2C719Bd5A-6A6A-51F4-733A-00Ed2311 BOOLEAN FALSE Pilot_File Pilot 5De2C719Bd5A-6A6A-51F4-733A-00Ed2311Instance_1 FALSE
Instance_1 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Birth 231124B9A0Be-3Bc8-C684-E82C-3Dad8183 DATE 6641 Pilot_File Pilot 231124B9A0Be-3Bc8-C684-E82C-3Dad8183Instance_1 6641
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam med 2F583Bd47052-A418-3Bb4-B4E0-1C5C3933 BOOLEAN FALSE Pilot_File Pilot 2F583Bd47052-A418-3Bb4-B4E0-1C5C3933Instance_1 FALSE
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Fname E4A3E63Fde3B-490A-A664-765E-C0A61Bf3 STRING Dania Pilot_File Pilot E4A3E63Fde3B-490A-A664-765E-C0A61Bf3Instance_1 Dania
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Address C9E9Cc567A9C-5Eda-6Cf4-2D53-73E1F4Ec STRING Rd5 Pilot_File Pilot C9E9Cc567A9C-5Eda-6Cf4-2D53-73E1F4EcInstance_1 Rd5
Instance_1 Resider c9affc56-3771-4e0f-b756-6790ff843b0b Prov B39Df12A5E1F-3D0A-20A4-Dac1-6E147518 PICKLIST ON Pilot_File Pilot B39Df12A5E1F-3D0A-20A4-Dac1-6E147518Instance_1 ON
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam care D519Ebdc0503-A9Fa-7E84-2A51-E0E6B22B BOOLEAN TRUE Pilot_File Pilot D519Ebdc0503-A9Fa-7E84-2A51-E0E6B22BInstance_1 TRUE
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad City 2B40E2762Abd-33Bb-1704-0D98-F873Fd14 STRING Almountain Pilot_File Pilot 2B40E2762Abd-33Bb-1704-0D98-F873Fd14Instance_1 Almountain
Instance_1 Status c30de961-6ad0-4c4d-8ee3-d59f5de4d60c Pre-part 7Bf540B271D6-9B5B-8Cc4-Eb93-8Ac9Bd06 PICKLIST Yes Pilot_File Pilot 7Bf540B271D6-9B5B-8Cc4-Eb93-8Ac9Bd06Instance_1 Yes
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam work C363836F96Be-Ab4B-7184-4C3C-0C10A84E BOOLEAN TRUE Pilot_File Pilot C363836F96Be-Ab4B-7184-4C3C-0C10A84EInstance_1 TRUE
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Lname 41Eef2B4849A-A708-F464-12Ac-B64B39D0 STRING Feeve Pilot_File Pilot 41Eef2B4849A-A708-F464-12Ac-B64B39D0Instance_1 Feeve
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Prove B2E650010330-E0E9-5Ac4-2C89-1B62A777 PICKLIST ON Pilot_File Pilot B2E650010330-E0E9-5Ac4-2C89-1B62A777Instance_1 ON
Instance_1 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam dis 85E9Afea6C67-3E49-C524-144E-3E70B77B BOOLEAN FALSE Pilot_File Pilot 85E9Afea6C67-3E49-C524-144E-3E70B77BInstance_1 FALSE
Instance_1 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Post 6A54507Cb8C0-6D8B-08E4-2Fdc-Faf1C495 STRING K2K1B3 Pilot_File Pilot 6A54507Cb8C0-6D8B-08E4-2Fdc-Faf1C495Instance_1 K2K1B3
Instance_2 Disabler db8f65e9-065d-41cb-96f3-36ee7bd892cf Cred F301E437Eacb-Ce09-80E4-713C-61F85A09 PICKLIST Yes Co-Pilot_File Co-Pilot F301E437Eacb-Ce09-80E4-713C-61F85A09Instance_2 Yes
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH Principal 16Ca8308B756-F909-E244-5802-019F647A PICKLIST Yes Co-Pilot_File Co-Pilot 16Ca8308B756-F909-E244-5802-019F647AInstance_2 Yes
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH type 4D5B56E0C54F-Be2A-14C4-9Bc9-4D769865 PICKLIST unit Co-Pilot_File Co-Pilot 4D5B56E0C54F-Be2A-14C4-9Bc9-4D769865Instance_2 unit
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH this year 6C80F9B3B190-01F8-8Ec4-944A-2323101C PICKLIST Yes Co-Pilot_File Co-Pilot 6C80F9B3B190-01F8-8Ec4-944A-2323101CInstance_2 Yes
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH address Dafc339Ad2Af-08Fa-4094-B111-38Cfc989 PICKLIST Use mail Co-Pilot_File Co-Pilot Dafc339Ad2Af-08Fa-4094-B111-38Cfc989Instance_2 Use mail
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH who 6A42F461F7Bc-0F68-4444-495A-F7Dce6E4 PICKLIST me and co-pilot Co-Pilot_File Co-Pilot 6A42F461F7Bc-0F68-4444-495A-F7Dce6E4Instance_2 me and co-pilot
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH better Da468Ed1C38C-7029-8924-1507-Eefe2F97 PICKLIST Yes Co-Pilot_File Co-Pilot Da468Ed1C38C-7029-8924-1507-Eefe2F97Instance_2 Yes
Instance_2 First timer a298166f-2c2f-4461-bba8-2b6fe1b730d7 FTH disable 33Ab5D3F22B9-Ae5A-2634-0Ffa-4E437000 PICKLIST Yes Co-Pilot_File Co-Pilot 33Ab5D3F22B9-Ae5A-2634-0Ffa-4E437000Instance_2 Yes
Instance_2 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Sine Af5A56026066-6A38-F924-4B68-A5495366 STRING 555555555 Co-Pilot_File Co-Pilot Af5A56026066-6A38-F924-4B68-A5495366Instance_2 555555555
Instance_2 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Outer 369D5E00925B-60Cb-7924-D0Eb-7B10F916 PICKLIST Yes Co-Pilot_File Co-Pilot 369D5E00925B-60Cb-7924-D0Eb-7B10F916Instance_2 Yes
Instance_2 Status c30de961-6ad0-4c4d-8ee3-d59f5de4d60c Marstat 98F8D8Df15Cf-3C5B-1224-B985-46Fc8Dc0 PICKLIST Mar Co-Pilot_File Co-Pilot 98F8D8Df15Cf-3C5B-1224-B985-46Fc8Dc0Instance_2 Mar
Instance_2 Arriving de578083-7194-4844-ac64-82c16d3c0d1a To A1Ddbb67C6Ed-31C9-A434-5Bf2-1A81Eef4 PICKLIST No Co-Pilot_File Co-Pilot A1Ddbb67C6Ed-31C9-A434-5Bf2-1A81Eef4Instance_2 No
Instance_2 Arriving de578083-7194-4844-ac64-82c16d3c0d1a Away Bf7Ecaaa2397-E398-Cfe4-F9B0-136E325F PICKLIST No Co-Pilot_File Co-Pilot Bf7Ecaaa2397-E398-Cfe4-F9B0-136E325FInstance_2 No
Instance_2 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam child Dd4028Face79-2258-Eb14-F8F8-1D722Fa8 BOOLEAN FALSE Co-Pilot_File Co-Pilot Dd4028Face79-2258-Eb14-F8F8-1D722Fa8Instance_2 FALSE
Instance_2 Eligibility 797066f6-ef67-4b12-abcb-827a46b3ef88 Officer A1F459120021-Bca9-8Ae4-3531-9B94E358 BOOLEAN FALSE Co-Pilot_File Co-Pilot A1F459120021-Bca9-8Ae4-3531-9B94E358Instance_2 FALSE
Instance_2 Eligibility 797066f6-ef67-4b12-abcb-827a46b3ef88 Confin 5De2C719Bd5A-6A6A-51F4-733A-00Ed2311 BOOLEAN FALSE Co-Pilot_File Co-Pilot 5De2C719Bd5A-6A6A-51F4-733A-00Ed2311Instance_2 FALSE
Instance_2 Fighter e6aab418-5963-4e78-a698-39fac82ef10d Vol B6Ef678E8E12-33C8-1704-69Fa-A55A0537 PICKLIST Fighter Co-Pilot_File Co-Pilot B6Ef678E8E12-33C8-1704-69Fa-A55A0537Instance_2 Fighter
Instance_2 Your info 90175471-fa8c-4123-b7d9-625e0e5fe1c6 Birth 231124B9A0Be-3Bc8-C684-E82C-3Dad8183 DATE 7372 Co-Pilot_File Co-Pilot 231124B9A0Be-3Bc8-C684-E82C-3Dad8183Instance_2 7372
Instance_2 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Fname E4A3E63Fde3B-490A-A664-765E-C0A61Bf3 STRING Jim Co-Pilot_File Co-Pilot E4A3E63Fde3B-490A-A664-765E-C0A61Bf3Instance_2 Jim
Instance_2 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Address C9E9Cc567A9C-5Eda-6Cf4-2D53-73E1F4Ec STRING Rd5 Co-Pilot_File Co-Pilot C9E9Cc567A9C-5Eda-6Cf4-2D53-73E1F4EcInstance_2 Rd5
Instance_2 Fighter e6aab418-5963-4e78-a698-39fac82ef10d 200h 7060F7C3A034-D0C8-Bea4-3B7F-958Abef0 PICKLIST Yes Co-Pilot_File Co-Pilot 7060F7C3A034-D0C8-Bea4-3B7F-958Abef0Instance_2 Yes
Instance_2 Resider c9affc56-3771-4e0f-b756-6790ff843b0b Prov B39Df12A5E1F-3D0A-20A4-Dac1-6E147518 PICKLIST ON Co-Pilot_File Co-Pilot B39Df12A5E1F-3D0A-20A4-Dac1-6E147518Instance_2 ON
Instance_2 Status c30de961-6ad0-4c4d-8ee3-d59f5de4d60c Pre-part 7Bf540B271D6-9B5B-8Cc4-Eb93-8Ac9Bd06 PICKLIST Yes Co-Pilot_File Co-Pilot 7Bf540B271D6-9B5B-8Cc4-Eb93-8Ac9Bd06Instance_2 Yes
Instance_2 Optimization e3b81931-0333-4a9e-b8d0-f9526d6b258d Clam work C363836F96Be-Ab4B-7184-4C3C-0C10A84E BOOLEAN FALSE Co-Pilot_File Co-Pilot C363836F96Be-Ab4B-7184-4C3C-0C10A84EInstance_2 FALSE
Instance_2 Address f0b03873-1fb9-4df6-9aa0-9509859997ad Lname 41Eef2B4849A-A708-F464-12Ac-B64B39D0 STRING Feeve Co-Pilot_File Co-Pilot 41Eef2B4849A-A708-F464-12Ac-B64B39D0Instance_2 Feeve
Instance_B Rasp 4a8d742a-8dfc-468d-80ba-55521dff3af5 Rasp 30 85Fd1690C80D-9A8A-1Ef4-9Fde-4A4D0677 CURRENCY 500 Pilot_File Pilot 85Fd1690C80D-9A8A-1Ef4-9Fde-4A4D0677Instance_B 500
Instance_B Rasp 4a8d742a-8dfc-468d-80ba-55521dff3af5 Rasp 22 2C03A4B809F7-9139-D924-Edae-6Df67E2C CURRENCY 2905 Pilot_File Pilot 2C03A4B809F7-9139-D924-Edae-6Df67E2CInstance_B 2905
Instance_B Rasp 4a8d742a-8dfc-468d-80ba-55521dff3af5 Rasp 16 C798E0De8773-5Dea-B594-2C2C-Bc0774Ca CURRENCY 4600 Pilot_File Pilot C798E0De8773-5Dea-B594-2C2C-Bc0774CaInstance_B 4600
Instance_C Forty wait 45b235d0-f923-4bc5-875b-3eea18b7d1de Fl28 24E38C754E91-248B-1C94-958E-7C6A40C5 CURRENCY 17696 Co-Pilot_File Co-Pilot 24E38C754E91-248B-1C94-958E-7C6A40C5Instance_C 17696
Instance_C Forty wait 45b235d0-f923-4bc5-875b-3eea18b7d1de fw040 E73E59F3C656-Abda-6144-A680-D1A630Da CURRENCY 10880 Co-Pilot_File Co-Pilot E73E59F3C656-Abda-6144-A680-D1A630DaInstance_C 10880
Instance_C Forty wait 45b235d0-f923-4bc5-875b-3eea18b7d1de fw080 58F455359409-939A-5224-229F-0903794B CURRENCY 5312 Co-Pilot_File Co-Pilot 58F455359409-939A-5224-229F-0903794BInstance_C 5312
Instance_C Forty wait 45b235d0-f923-4bc5-875b-3eea18b7d1de fw440 2F4384Aa9068-Ec18-Ec34-0340-Df7883Ef CURRENCY 8790 Co-Pilot_File Co-Pilot 2F4384Aa9068-Ec18-Ec34-0340-Df7883EfInstance_C 8790
Instance_C Forty wait 45b235d0-f923-4bc5-875b-3eea18b7d1de fw360 7C289B99D923-3C1B-7444-95E9-0Ca3E514 CURRENCY 1504 Co-Pilot_File Co-Pilot 7C289B99D923-3C1B-7444-95E9-0Ca3E514Instance_C 1504
Instance_D Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray205_Cfa76928Fb5F-1218-56D4-3Aff-58E07812 Cfa76928Fb5F-1218-56D4-3Aff-58E07812 CURRENCY 500 Pilot_File Pilot Cfa76928Fb5F-1218-56D4-3Aff-58E07812Instance_D 500
Instance_D Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray01s_057Bcab44947-9Da9-6D44-52Af-34648Ee2 057Bcab44947-9Da9-6D44-52Af-34648Ee2 PICKLIST Fed Pilot_File Pilot 057Bcab44947-9Da9-6D44-52Af-34648Ee2Instance_D Fed
Instance_D Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray boolean_230Eb5Bb9895-2Eca-B454-5209-71E27218 230Eb5Bb9895-2Eca-B454-5209-71E27218 BOOLEAN TRUE Pilot_File Pilot 230Eb5Bb9895-2Eca-B454-5209-71E27218Instance_D TRUE
Instance_D Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray date_C07139810A05-C4B9-D494-2D66-4Baa27Af C07139810A05-C4B9-D494-2D66-4Baa27Af DATE 7372 Pilot_File Pilot C07139810A05-C4B9-D494-2D66-4Baa27AfInstance_D 7372
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray022_4F43D278237D-D75B-Af14-F95C-A07F66F7 4F43D278237D-D75B-Af14-F95C-A07F66F7 CURRENCY 7000 Pilot_File Pilot 4F43D278237D-D75B-Af14-F95C-A07F66F7Instance_E 7000
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray024_C64C5A254720-8Fa9-3824-98B6-4F41618F C64C5A254720-8Fa9-3824-98B6-4F41618F CURRENCY 4350 Pilot_File Pilot C64C5A254720-8Fa9-3824-98B6-4F41618FInstance_E 4350
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray016_2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7Cd 2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7Cd CURRENCY 9615 Pilot_File Pilot 2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7CdInstance_E 9615
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray018_38623C1B3Cbd-2098-9594-De57-1Ea73F92 38623C1B3Cbd-2098-9594-De57-1Ea73F92 CURRENCY 12750 Pilot_File Pilot 38623C1B3Cbd-2098-9594-De57-1Ea73F92Instance_E 12750
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray01s057Bcab44947-9Da9-6D44-52Af-34648Ee2 057Bcab44947-9Da9-6D44-52Af-34648Ee2 PICKLIST Fed Pilot_File Pilot 057Bcab44947-9Da9-6D44-52Af-34648Ee2Instance_E Fed
Instance_E Foray 7e053706-1f2b-4397-bf80-b345671d22c10 Foray046_B1Ea4005125B-F318-D0D4-Ef9D-C0E2669D B1Ea4005125B-F318-D0D4-Ef9D-C0E2669D CURRENCY 187 Pilot_File Pilot B1Ea4005125B-F318-D0D4-Ef9D-C0E2669DInstance_E 187
Instance_F Tree 578146d5-5bce-4927-9880-1233d78d05fb Tree26 9073C88A8A56-0099-C224-E841-E674Da36 CURRENCY 17800 Co-Pilot_File Co-Pilot 9073C88A8A56-0099-C224-E841-E674Da36Instance_F 17800
Instance_G Foreign f017da6d-af6d-4491-84f2-34266a90639e Typ Dfaf52Cf4B32-E92B-6804-31Be-0E1874C0 PICKLIST Sec ben Co-Pilot_File Co-Pilot Dfaf52Cf4B32-E92B-6804-31Be-0E1874C0Instance_G Sec ben
Instance_G Foreign f017da6d-af6d-4491-84f2-34266a90639e Amt C6Ca3Edcdbcb-Ae4A-D864-8C7A-7B138A4E CURRENCY 2000 Co-Pilot_File Co-Pilot C6Ca3Edcdbcb-Ae4A-D864-8C7A-7B138A4EInstance_G 2000
Instance_G Foreign f017da6d-af6d-4491-84f2-34266a90639e Ency E73F143Eca75-D6A9-1054-0E06-503918Ec PICKLIST CAD Co-Pilot_File Co-Pilot E73F143Eca75-D6A9-1054-0E06-503918EcInstance_G CAD
Instance_G Foreign f017da6d-af6d-4491-84f2-34266a90639e Sub B2E413C14B1D-F1B9-9A94-6687-A85Dae60 PICKLIST No Co-Pilot_File Co-Pilot B2E413C14B1D-F1B9-9A94-6687-A85Dae60Instance_G No
Instance_H Tonne a13b55f1-833b-4425-88d7-989964c35e5e L26 2A78A51A6189-Ff1A-0934-Ff0A-6B8Fb6Da CURRENCY 38100 Pilot_File Pilot 2A78A51A6189-Ff1A-0934-Ff0A-6B8Fb6DaInstance_H 38100
Instance_H Tonne a13b55f1-833b-4425-88d7-989964c35e5e Fl96 Ae973C0Bf9A1-69D8-1D24-8F55-265799A2 CURRENCY 30373.95 Pilot_File Pilot Ae973C0Bf9A1-69D8-1D24-8F55-265799A2Instance_H 30373.95
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e Fl73left 6893C192E6D3-1459-C694-A38E-E41D2D3F CURRENCY 2925 Co-Pilot_File Co-Pilot 6893C192E6D3-1459-C694-A38E-E41D2D3FInstance_I 2925
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T1600 669E243F3Ca5-9C88-40C4-2Cc8-2575Ae08 CURRENCY 8662 Co-Pilot_File Co-Pilot 669E243F3Ca5-9C88-40C4-2Cc8-2575Ae08Instance_I 8662
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T0100 819A6A3Fd047-5Dd8-0534-B7Fa-4A7D3Ef9 CURRENCY 7713 Co-Pilot_File Co-Pilot 819A6A3Fd047-5Dd8-0534-B7Fa-4A7D3Ef9Instance_I 7713
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T6000 2A78A51A6189-Ff1A-0934-Ff0A-6B8Fb6Da CURRENCY 19500 Co-Pilot_File Co-Pilot 2A78A51A6189-Ff1A-0934-Ff0A-6B8Fb6DaInstance_I 19500
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T3000 22B0F0242B1B-3Bda-6Bd4-4F2C-9Dfeda7B CURRENCY 13808 Co-Pilot_File Co-Pilot 22B0F0242B1B-3Bda-6Bd4-4F2C-9Dfeda7BInstance_I 13808
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T3122 3Fba85D18287-464A-7804-A3Ba-C8F8Ceae CURRENCY 3000 Co-Pilot_File Co-Pilot 3Fba85D18287-464A-7804-A3Ba-C8F8CeaeInstance_I 3000
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T3127 590F16B901C5-Fed8-29B4-9Cc8-24168010 CURRENCY 2500 Co-Pilot_File Co-Pilot 590F16B901C5-Fed8-29B4-9Cc8-24168010Instance_I 2500
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e Fl96 Ae973C0Bf9A1-69D8-1D24-8F55-265799A2 CURRENCY 28721 Co-Pilot_File Co-Pilot Ae973C0Bf9A1-69D8-1D24-8F55-265799A2Instance_I 28721
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e T3140 685B0Da29907-1C4A-Eff4-58Ee-1A7F49A3 CURRENCY 1700 Co-Pilot_File Co-Pilot 685B0Da29907-1C4A-Eff4-58Ee-1A7F49A3Instance_I 1700
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e TFname 27Ea34A4Cb39-A368-6874-D98E-4B40F166 STRING Jim Co-Pilot_File Co-Pilot 27Ea34A4Cb39-A368-6874-D98E-4B40F166Instance_I Jim
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e TLname 584C6F427F9D-Bc6A-B984-A523-44E58D77 STRING Feeve Co-Pilot_File Co-Pilot 584C6F427F9D-Bc6A-B984-A523-44E58D77Instance_I Feeve
Instance_I Tonne a13b55f1-833b-4425-88d7-989964c35e5e 33600 42F2066Bb452-E279-5E14-66C4-9048E817 CURRENCY 19800 Co-Pilot_File Co-Pilot 42F2066Bb452-E279-5E14-66C4-9048E817Instance_I 19800
Instance_J Forest d20a8fb2-b1b1-4b3d-b77e-07b2f9d7a3ad Forest18 161D32E807E8-A939-4054-5A45-875348E0 CURRENCY 3380 Pilot_File Pilot 161D32E807E8-A939-4054-5A45-875348E0Instance_J 3380
Instance_J Forest d20a8fb2-b1b1-4b3d-b77e-07b2f9d7a3ad Forest21 B4Dbb1D01E0A-227A-D964-Cc9A-E7A0Ec14 CURRENCY 3800 Pilot_File Pilot B4Dbb1D01E0A-227A-D964-Cc9A-E7A0Ec14Instance_J 3800
Instance_K Sable 2ec3def2-8c70-468a-95db-1e92a6c53f7b Rel 932D068666B6-F59A-4954-E9Ba-20004Cb4 PICKLIST Louse Pilot_File Pilot 932D068666B6-F59A-4954-E9Ba-20004Cb4Instance_K Louse
Instance_L Sable 2ec3def2-8c70-468a-95db-1e92a6c53f7b Rel 932D068666B6-F59A-4954-E9Ba-20004Cb4 PICKLIST My Co-Pilot_File Co-Pilot 932D068666B6-F59A-4954-E9Ba-20004Cb4Instance_L My

and the values from the 'TABLE_CONFIG' sheet:

Section field Id Field name Config sequence Section Id Section name Field key and col header
8Abb0E9D730A-776B-E714-9B6C-6449Ba3E For 16 2 1a224188-8bed-4f5c-b731-32b98f4290b6 For For 16_8Abb0E9D730A-776B-E714-9B6C-6449Ba3E
C38Eec9Df1C4-0A98-30C4-2A20-6222F429 For 18 3 1a224188-8bed-4f5c-b731-32b98f4290b6 For For 18_C38Eec9Df1C4-0A98-30C4-2A20-6222F429
14D14Bcbc72E-C8B9-04E4-Fd45-9Be7Fe3F For 28 ceep 4 1a224188-8bed-4f5c-b731-32b98f4290b6 For For 28 ceep_14D14Bcbc72E-C8B9-04E4-Fd45-9Be7Fe3F
95Bfe351F32E-E689-22B4-2C4E-D2453D2B For 28 E 5 1a224188-8bed-4f5c-b731-32b98f4290b6 For For 28 E_95Bfe351F32E-E689-22B4-2C4E-D2453D2B
5B77725B43E4-Ee18-7E04-450C-6F322F4A For 28 pip 6 1a224188-8bed-4f5c-b731-32b98f4290b6 For For 28 pip_5B77725B43E4-Ee18-7E04-450C-6F322F4A
2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7Cd Foray016 7 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray016_2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7Cd
38623C1B3Cbd-2098-9594-De57-1Ea73F92 Foray018 8 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray018_38623C1B3Cbd-2098-9594-De57-1Ea73F92
4F43D278237D-D75B-Af14-F95C-A07F66F7 Foray022 9 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray022_4F43D278237D-D75B-Af14-F95C-A07F66F7
C64C5A254720-8Fa9-3824-98B6-4F41618F Foray024 10 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray024_C64C5A254720-8Fa9-3824-98B6-4F41618F
B1Ea4005125B-F318-D0D4-Ef9D-C0E2669D Foray046 11 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray046_B1Ea4005125B-F318-D0D4-Ef9D-C0E2669D
057Bcab44947-9Da9-6D44-52Af-34648Ee2 Foray01s 12 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray01s_057Bcab44947-9Da9-6D44-52Af-34648Ee2
Cfa76928Fb5F-1218-56D4-3Aff-58E07812 Foray205 13 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray205_Cfa76928Fb5F-1218-56D4-3Aff-58E07812
230Eb5Bb9895-2Eca-B454-5209-71E27218 Foray boolean 14 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray boolean_230Eb5Bb9895-2Eca-B454-5209-71E27218
C07139810A05-C4B9-D494-2D66-4Baa27Af Foray date 15 7e053706-1f2b-4397-bf80-b345671d22c10 Foray Foray date_C07139810A05-C4B9-D494-2D66-4Baa27Af

resulting in the following table on the 'PILOT_FORAY' sheet:

Instance Id Foray016_2C1F1F4F5D4A-C4Ea-5224-5878-A54Be7Cd Foray018_38623C1B3Cbd-2098-9594-De57-1Ea73F92 Foray022_4F43D278237D-D75B-Af14-F95C-A07F66F7 Foray024_C64C5A254720-8Fa9-3824-98B6-4F41618F Foray046_B1Ea4005125B-F318-D0D4-Ef9D-C0E2669D Foray01s_057Bcab44947-9Da9-6D44-52Af-34648Ee2 Foray205_Cfa76928Fb5F-1218-56D4-3Aff-58E07812 Foray boolean_230Eb5Bb9895-2Eca-B454-5209-71E27218 Foray date_C07139810A05-C4B9-D494-2D66-4Baa27Af File Id
Instance_D Fed 500 TRUE 1920-03-07 Pilot_File
Instance_E 9615 12750 7000 4350 187 Pilot_File

The problem I have is that when Number values from 'INPUT' are copied to another cell to be added (or some other calculation), they are not working, like so:

Sum Foray_016 Sum Foray_018 Sum Foray_022 Sum Foray_024 Sum Foray_046 Copy Foray_01s Eval Foray_boolean Eval Date Double Foray_205
Fed TRUE 1920-03-07 1000
9615 12750 7000 4350 187 0
0 0 0 0 0 Fed_copied Yes 1920 1000

Other value formats from 'INPUT' seem okay; for eaxample, String can be copied, Boolean and Date can be evaluated. If the reference is a formula (i.e. Double Foray_205, above) the Number behaves as a number. However, a simple copy of the value to a new cell does not, as in the first summed columns above showing 0.

Is there a way to modify the query to fix this? I understand that the query function is determining the most common value format and treating all values as such. The query would still need to work if any other format (number, boolean, date, etc.) was the most common in 'INPUT'.

  • Create a [mcve]. Don't just copy paste your data. Use example variables headers `A`,`B`,`C`. Data like simple numbers: `1`,`2`. The example should preferably be within 4x4 table for input and expected output. Show What you've tried. – TheMaster Oct 08 '22 at 18:54
  • Duplicate of https://stackoverflow.com/questions/68562518/query-is-ignoring-string-non-numeric-value (And this is how you should've asked) – TheMaster Oct 08 '22 at 19:00

1 Answers1

0

if QUERY is not able to evaluate mixed data then the only way how to tackle it is to convert input into plain text. this can be done in 5 ways:

appending trailing empty space:

=ARRAYFORMULA(QUERY(A:C&"", "select *", 0))

wrapping it into {}:

=ARRAYFORMULA(QUERY({A:C}, "select *", 0))

using formula:

=ARRAYFORMULA(QUERY(TO_TEXT(A:C), "select *", 0))

or partial combination. for example, if we know that column B is problematic but A and C are fine and shouldn't be converted we can do:

=ARRAYFORMULA(QUERY({A:A, TO_TEXT(B:B), C:C}, "select *", 0))

or formatting the source range as Plain Text

worth mentioning that either of these top 4 ways you use you will need ARRAYFORMULA wrapping and column references in SQL command needs to be Col1,Col2,Col3 instead of A,B,C

"yes, but I need outputted numeric values for further calculations"

nope, (in 99/100 cases) there is no need to actually have numeric values because by doing the calculation itself will convert automatically the plain text formatting into numeric values. example:

="123" + "2" 

if there is a special case when you totally need numeric values there is IFERROR workaround:

=ARRAYFORMULA(IFERROR(QUERY(TO_TEXT(A:C), "select *", 0)*1, 
                      QUERY(TO_TEXT(A:C), "select *", 0)))

by repeating the same thing twice this can get really long in some cases but it works. fortunately, this can be nicely refactored with LAMBDA like:

=ARRAYFORMULA(LAMBDA(x, IFERROR(x*1, x))
 (QUERY(TO_TEXT(A:C), "select *", 0)))
player0
  • 124,011
  • 12
  • 67
  • 124
  • It would be better if this question was closed and this answer moved [there](https://stackoverflow.com/questions/68562518/query-is-ignoring-string-non-numeric-value) as the question there is better and better suited to be a dupe target. – TheMaster Oct 08 '22 at 20:57
  • @TheMaster moved... – player0 Oct 08 '22 at 21:00