For each customer there is 3 Regions. For each Region there is 4 Orders and 4 Invoices.
The orders are displayed correctly - 4 per Region, but the invoices are displayed 4 times the number of Regions, 16 times (the same 4 invoices are displayed 4 times).
I have attached a test app. On the Web Server window I have placed a button for generating test data. There are 10 customers from 1 - 10.
CustomerView VIEW(Customer)
Project(CUS:GUID)
Project(CUS:Number)
Project(CUS:Name)
JOIN(REG:Customer_KEY,CUS:GUID)
JOIN(ORD:Region_KEY,REG:GUID)
END
JOIN(INV:Region_KEY,REG:GUID)
END
END
END
{
"databaseCustomer_response" : {
"customer" : [
{
"guid" : "6F6TMD0K-I55I-Z7WI-Z3Q4-YR8TTZUXP2IU",
"number" : 1,
"name" : "HO8W6UC3ATNOVPRKVQ4L",
"region" : [
{
"guid" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"customer" : "6F6TMD0K-I55I-Z7WI-Z3Q4-YR8TTZUXP2IU",
"name" : "K8Q6FF1XUPOMADMUH487",
"orders" : [
{
"number" : 1,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "MGZKGGW2U42TUJG7DB9NJ4ZS8AQ3OV9Q95A3SZ4CA2WZQABSBEA2IL627MC1QDWOWMFJR88N4DN34AO0ZU5FBCCFJM81822NOZCJ"
},
{
"number" : 2,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "WBYT3UXFM8W4VGZ9BOG90WDSU1BFYZQ1EEETFBWA5IDI4MWQETGTFTRN7UXERYTEVW7VABVJKR7B1W9ZYNUUG6KIZ0ISBPVESUF5"
},
{
"number" : 3,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "DIP39T5ZRNP7BNM1R8RZEJSX63YDIQ6QDMENOZ6ZNIRG4R2QLGUNUNTLLTZE7UNG0XOH93T7BXJJ3XGH69UMFQVJ4TTVYRACB6P5"
},
{
"number" : 4,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "CPWKCT7YS96MFAXSI4GUYCWWX0LDRU8J775I6U1PQPHG9VHCE0FEN9VLML7CHJP7HDLD9IRC0YZ2PNH84OAT1HQ468T9T16S7X5T"
}
],
"invoices" : [
{
"number" : 1,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "2MJ4MTEYS218HXN82GVRA88KA3DUAIY5X1RUNX6R1OHN0JZ31RVRP5HX9AL66TU9TF7UNWXNZ44JNVRXUD5Y6HPOKWR72SEE5BH9"
},
{
"number" : 2,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "OCCG3QEDTGCNC7NVL45PA8TEARHXXKNIEPR77UBRSBJROPI6KNLSYJMW8JPSNY62Q5OTDU3HEISKO2IWPQ4FP3EY5EDIPVCR7J9Y"
},
{
"number" : 3,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "VAEY2TMVY7SWETVNDJ472PKTFVDU2BO9QF6BUN02YFSU6SS80XURB24UIJU3DRDIVXEYHDX31JJJQ4NZ3MEV654Q0T7AUVPR6T37"
},
{
"number" : 4,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "0EDHIYVOYZOY9D053QXCTPJE3160J7WWS45JD9DTQK5U4MBQGGFWU0TMW74J1MRHFQTL74YJWVHF91P7N3MKY0DR1DUOYZHRYQT9"
},
{
"number" : 1,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "2MJ4MTEYS218HXN82GVRA88KA3DUAIY5X1RUNX6R1OHN0JZ31RVRP5HX9AL66TU9TF7UNWXNZ44JNVRXUD5Y6HPOKWR72SEE5BH9"
},
{
"number" : 2,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "OCCG3QEDTGCNC7NVL45PA8TEARHXXKNIEPR77UBRSBJROPI6KNLSYJMW8JPSNY62Q5OTDU3HEISKO2IWPQ4FP3EY5EDIPVCR7J9Y"
},
{
"number" : 3,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "VAEY2TMVY7SWETVNDJ472PKTFVDU2BO9QF6BUN02YFSU6SS80XURB24UIJU3DRDIVXEYHDX31JJJQ4NZ3MEV654Q0T7AUVPR6T37"
},
{
"number" : 4,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "0EDHIYVOYZOY9D053QXCTPJE3160J7WWS45JD9DTQK5U4MBQGGFWU0TMW74J1MRHFQTL74YJWVHF91P7N3MKY0DR1DUOYZHRYQT9"
},
{
"number" : 1,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "2MJ4MTEYS218HXN82GVRA88KA3DUAIY5X1RUNX6R1OHN0JZ31RVRP5HX9AL66TU9TF7UNWXNZ44JNVRXUD5Y6HPOKWR72SEE5BH9"
},
{
"number" : 2,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "OCCG3QEDTGCNC7NVL45PA8TEARHXXKNIEPR77UBRSBJROPI6KNLSYJMW8JPSNY62Q5OTDU3HEISKO2IWPQ4FP3EY5EDIPVCR7J9Y"
},
{
"number" : 3,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "VAEY2TMVY7SWETVNDJ472PKTFVDU2BO9QF6BUN02YFSU6SS80XURB24UIJU3DRDIVXEYHDX31JJJQ4NZ3MEV654Q0T7AUVPR6T37"
},
{
"number" : 4,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "0EDHIYVOYZOY9D053QXCTPJE3160J7WWS45JD9DTQK5U4MBQGGFWU0TMW74J1MRHFQTL74YJWVHF91P7N3MKY0DR1DUOYZHRYQT9"
},
{
"number" : 1,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "2MJ4MTEYS218HXN82GVRA88KA3DUAIY5X1RUNX6R1OHN0JZ31RVRP5HX9AL66TU9TF7UNWXNZ44JNVRXUD5Y6HPOKWR72SEE5BH9"
},
{
"number" : 2,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "OCCG3QEDTGCNC7NVL45PA8TEARHXXKNIEPR77UBRSBJROPI6KNLSYJMW8JPSNY62Q5OTDU3HEISKO2IWPQ4FP3EY5EDIPVCR7J9Y"
},
{
"number" : 3,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "VAEY2TMVY7SWETVNDJ472PKTFVDU2BO9QF6BUN02YFSU6SS80XURB24UIJU3DRDIVXEYHDX31JJJQ4NZ3MEV654Q0T7AUVPR6T37"
},
{
"number" : 4,
"region" : "UY1YK6IG-PZBE-CAVL-5BKA-3WC91IXV6PBI",
"text" : "0EDHIYVOYZOY9D053QXCTPJE3160J7WWS45JD9DTQK5U4MBQGGFWU0TMW74J1MRHFQTL74YJWVHF91P7N3MKY0DR1DUOYZHRYQT9"
}
]
},
{
"guid" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"customer" : "6F6TMD0K-I55I-Z7WI-Z3Q4-YR8TTZUXP2IU",
"name" : "RJDN03XFHLIEGPN76QWQ",
"orders" : [
{
"number" : 5,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "JD9DH9ZT1AS36676E31BPCKFR1I164KA9EKC71KW7IYISCGD66FXMQ0JCDNJ6QVF7SREO9CHRPG4OSXS3LE700VE32TB7JQ6ZDGM"
},
{
"number" : 6,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "QY0OZITB8IW8YFUZN4VV9UK0HSZX6ONPI5ET9BJP5PRO15DXQ8VE9UZX6NKAHUKFD3HC6H22KTGDTWHWOC76NZZN07037Q9XR2M4"
},
{
"number" : 7,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "GRWCMPB5ZGEB5HS2J06SK9GSNBOEXNEGLF0HZEO70HJI9R9PV23NHZ0MU1ULE7BW6DK5G9TQLYLPGXIRV7Y8JBHZBVRUCFQGK7LO"
},
{
"number" : 8,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "PWPCN03701LJUFUQ9G44N9GMO75F33IDN1UWRVSZ2FT50ISOLN3PS6WS9GW19OHPLQUH528FRHXURC0YYBTU2OK2C28YICXZOSKK"
}
],
"invoices" : [
{
"number" : 5,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "RM69340CY2UTAGZXOJC2WCR7JKBIAJKLSSAHBZBH2LWWOAFFD7SWKTM24O1AXP55UXFWURULM1KIEAJ36H926RGF4XMXJS1DPN6W"
},
{
"number" : 6,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "67G63ZVCHV81IOECQNOPCKSGNRRAM1V8H4TXPF60ZLLBRW7HXAMPRXH462PI6S07KBCJX01P2OTJ17F9NBHUXDY66UZQ2OR6DZU0"
},
{
"number" : 7,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "NWEWFNW3CCK2Q1ZECEGG6TVN5NTGTYXU19J7R8B1FUC4QA37BWPBAANZNDXCWM4V94WC9Z7972N7LNSMSO3NC9OM85LT70Q6RW9F"
},
{
"number" : 8,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "L8PNE3WFCMDRBSFFJMB5DABE25OKY8TQH4H9HDS9A0FV0LMBKDCTCZQTFBU5ARPBEVWOAQJCW67OC0UL2PWT0A5A02VVD0I4EBKE"
},
{
"number" : 5,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "RM69340CY2UTAGZXOJC2WCR7JKBIAJKLSSAHBZBH2LWWOAFFD7SWKTM24O1AXP55UXFWURULM1KIEAJ36H926RGF4XMXJS1DPN6W"
},
{
"number" : 6,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "67G63ZVCHV81IOECQNOPCKSGNRRAM1V8H4TXPF60ZLLBRW7HXAMPRXH462PI6S07KBCJX01P2OTJ17F9NBHUXDY66UZQ2OR6DZU0"
},
{
"number" : 7,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "NWEWFNW3CCK2Q1ZECEGG6TVN5NTGTYXU19J7R8B1FUC4QA37BWPBAANZNDXCWM4V94WC9Z7972N7LNSMSO3NC9OM85LT70Q6RW9F"
},
{
"number" : 8,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "L8PNE3WFCMDRBSFFJMB5DABE25OKY8TQH4H9HDS9A0FV0LMBKDCTCZQTFBU5ARPBEVWOAQJCW67OC0UL2PWT0A5A02VVD0I4EBKE"
},
{
"number" : 5,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "RM69340CY2UTAGZXOJC2WCR7JKBIAJKLSSAHBZBH2LWWOAFFD7SWKTM24O1AXP55UXFWURULM1KIEAJ36H926RGF4XMXJS1DPN6W"
},
{
"number" : 6,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "67G63ZVCHV81IOECQNOPCKSGNRRAM1V8H4TXPF60ZLLBRW7HXAMPRXH462PI6S07KBCJX01P2OTJ17F9NBHUXDY66UZQ2OR6DZU0"
},
{
"number" : 7,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "NWEWFNW3CCK2Q1ZECEGG6TVN5NTGTYXU19J7R8B1FUC4QA37BWPBAANZNDXCWM4V94WC9Z7972N7LNSMSO3NC9OM85LT70Q6RW9F"
},
{
"number" : 8,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "L8PNE3WFCMDRBSFFJMB5DABE25OKY8TQH4H9HDS9A0FV0LMBKDCTCZQTFBU5ARPBEVWOAQJCW67OC0UL2PWT0A5A02VVD0I4EBKE"
},
{
"number" : 5,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "RM69340CY2UTAGZXOJC2WCR7JKBIAJKLSSAHBZBH2LWWOAFFD7SWKTM24O1AXP55UXFWURULM1KIEAJ36H926RGF4XMXJS1DPN6W"
},
{
"number" : 6,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "67G63ZVCHV81IOECQNOPCKSGNRRAM1V8H4TXPF60ZLLBRW7HXAMPRXH462PI6S07KBCJX01P2OTJ17F9NBHUXDY66UZQ2OR6DZU0"
},
{
"number" : 7,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "NWEWFNW3CCK2Q1ZECEGG6TVN5NTGTYXU19J7R8B1FUC4QA37BWPBAANZNDXCWM4V94WC9Z7972N7LNSMSO3NC9OM85LT70Q6RW9F"
},
{
"number" : 8,
"region" : "D25DL884-BH5Y-37A8-OE14-ZI6RY75VZQEA",
"text" : "L8PNE3WFCMDRBSFFJMB5DABE25OKY8TQH4H9HDS9A0FV0LMBKDCTCZQTFBU5ARPBEVWOAQJCW67OC0UL2PWT0A5A02VVD0I4EBKE"
}
]
},
{
"guid" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"customer" : "6F6TMD0K-I55I-Z7WI-Z3Q4-YR8TTZUXP2IU",
"name" : "801DE2BYJAB95LB5UIHM",
"orders" : [
{
"number" : 9,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "T7W2HPEKM8GPFIOL2M1M9YDRWEVLFSL9EHDF59JPUNPN9Z4E7FI5NZPSB3XMC5LTKTWS9D76JYUW3UY67G8JUGCXRO1F8EEQODZN"
},
{
"number" : 10,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "SO234GVOJNMQCB5HVPXSZRHMNLY4S0HH3BINA1E11RC1DAECRP6AVHMZ933HGES2E3S3EXLX6COZ4GYCKJPRYDRV7BX3X14ONEF2"
},
{
"number" : 11,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "4K0TRFP45PGM0WW91BWK8O0YRVNHTLEYBDAW1BDP4S9H13TLAHTMPQ6KL3LD6Q7KJQLZNPKC33VKV8MTY8SO9UNDEQ7IOKRYD2U3"
},
{
"number" : 12,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "GJXL5R4VHIXOZ12EW91ZLDJ8NLREYC68FM84XB8D8M43T2REX2F9IWZEO9JR65TC81ASCMN0OTWKDXPRZIF70TJHKZW7DCIQSFPV"
}
],
"invoices" : [
{
"number" : 9,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "X6T6RNEFEANVJ8D30NKOJ7ZX9BJK21GATP4KR52LJWRY0LW0BBZ2ZG1XH8STW9ZPB94ZYGHIOD5BOXOWI92LN7Z8QV68T8SJAMT1"
},
{
"number" : 10,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "ZB6PBQUALQM7GDPMKXZK1GAH5IEV6LNO8W077X0R9EPSEC8SVSNNIW651S78F9S2PQMQ9RKUA9P6GW5S9OS4IEYSB8JNW91TEO7A"
},
{
"number" : 11,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "AUFDJTX44ATJT5HSVRL8M0N9RWZ5I8TAIXBAZF3SZF31K9SNINA1OXLAU26BI2XERQ4K7828RY8DE2KJGJTJ8DXMEJW1CTKPOJZN"
},
{
"number" : 12,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "5KPRLJKXVOPYY7X948OY4D1CV4N899NTFQY4ZQY7ZVSU5ZKEE6UMAQSGH5778SDKD2GI2EJ0CKI8D9U1BI5Y75WPTQ27A28PP223"
},
{
"number" : 9,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "X6T6RNEFEANVJ8D30NKOJ7ZX9BJK21GATP4KR52LJWRY0LW0BBZ2ZG1XH8STW9ZPB94ZYGHIOD5BOXOWI92LN7Z8QV68T8SJAMT1"
},
{
"number" : 10,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "ZB6PBQUALQM7GDPMKXZK1GAH5IEV6LNO8W077X0R9EPSEC8SVSNNIW651S78F9S2PQMQ9RKUA9P6GW5S9OS4IEYSB8JNW91TEO7A"
},
{
"number" : 11,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "AUFDJTX44ATJT5HSVRL8M0N9RWZ5I8TAIXBAZF3SZF31K9SNINA1OXLAU26BI2XERQ4K7828RY8DE2KJGJTJ8DXMEJW1CTKPOJZN"
},
{
"number" : 12,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "5KPRLJKXVOPYY7X948OY4D1CV4N899NTFQY4ZQY7ZVSU5ZKEE6UMAQSGH5778SDKD2GI2EJ0CKI8D9U1BI5Y75WPTQ27A28PP223"
},
{
"number" : 9,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "X6T6RNEFEANVJ8D30NKOJ7ZX9BJK21GATP4KR52LJWRY0LW0BBZ2ZG1XH8STW9ZPB94ZYGHIOD5BOXOWI92LN7Z8QV68T8SJAMT1"
},
{
"number" : 10,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "ZB6PBQUALQM7GDPMKXZK1GAH5IEV6LNO8W077X0R9EPSEC8SVSNNIW651S78F9S2PQMQ9RKUA9P6GW5S9OS4IEYSB8JNW91TEO7A"
},
{
"number" : 11,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "AUFDJTX44ATJT5HSVRL8M0N9RWZ5I8TAIXBAZF3SZF31K9SNINA1OXLAU26BI2XERQ4K7828RY8DE2KJGJTJ8DXMEJW1CTKPOJZN"
},
{
"number" : 12,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "5KPRLJKXVOPYY7X948OY4D1CV4N899NTFQY4ZQY7ZVSU5ZKEE6UMAQSGH5778SDKD2GI2EJ0CKI8D9U1BI5Y75WPTQ27A28PP223"
},
{
"number" : 9,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "X6T6RNEFEANVJ8D30NKOJ7ZX9BJK21GATP4KR52LJWRY0LW0BBZ2ZG1XH8STW9ZPB94ZYGHIOD5BOXOWI92LN7Z8QV68T8SJAMT1"
},
{
"number" : 10,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "ZB6PBQUALQM7GDPMKXZK1GAH5IEV6LNO8W077X0R9EPSEC8SVSNNIW651S78F9S2PQMQ9RKUA9P6GW5S9OS4IEYSB8JNW91TEO7A"
},
{
"number" : 11,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "AUFDJTX44ATJT5HSVRL8M0N9RWZ5I8TAIXBAZF3SZF31K9SNINA1OXLAU26BI2XERQ4K7828RY8DE2KJGJTJ8DXMEJW1CTKPOJZN"
},
{
"number" : 12,
"region" : "F4NN5J7N-IGF1-QNMF-8RXY-NDH918LH72R7",
"text" : "5KPRLJKXVOPYY7X948OY4D1CV4N899NTFQY4ZQY7ZVSU5ZKEE6UMAQSGH5778SDKD2GI2EJ0CKI8D9U1BI5Y75WPTQ27A28PP223"
}
]
}
]
}
],
"skippedrecords" : "0",
"resultcomplete" : "1"
}
}