With(
{pInput: ParseJSON(pJSON)},
Switch(
pRepo,
“ABB”,
ClearCollect(
col_ABBs,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_ABBsR4.dbospabbfinderr4(
//Parameters:
{
filterabbstatus: Text(
Coalesce(
Text(pInput.abbstatus),
“”
)
),
filterproduct: If(
IsBlank(_SelectedProductID),
Text(
Coalesce(
Text(pInput.product),
“”
)
),
_SelectedProductID
),
filtersector: Text(
Coalesce(
Text(pInput.sector),
“”
)
),
filterindustry: Text(
Coalesce(
Text(pInput.industry),
“”
)
),
filtersituation: Text(
Coalesce(
Text(pInput.situation),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
),
filterproductgroupl0: Text(
Coalesce(
Text(pInput.productgroupl0),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
abbid,
Text(Value.abbid),
abbname,
Text(Value.abbname),
abbdescription,
Text(Value.abbdescription),
abbstatus,
Text(Value.abbstatus),
downloadcount,
Value(Value.downloadcount),
viewcount,
Value(Value.viewcount),
abbnumber,
Text(Value.abbnumber),
ppturl,
Text(Value.ppturl),
abbshortdescription,
Text(Value.abbshortdescription)
),
Value
)
),
“DataCatalogue”,
ClearCollect(
_dataCatalogueLib,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_DCLibR4.dbospdatacataloguelibraryr4(
//Parameters
{
filteraccess: Text(
Coalesce(
Text(pInput.access),
“”
)
),
filterdatasourceprovider: Text(
Coalesce(
Text(pInput.datasourceprovider),
“”
)
),
filterindustry: Text(
Coalesce(
Text(pInput.industry),
“”
)
),
filterlicense: Text(
Coalesce(
Text(pInput.license),
“”
)
),
filtermemberfirm: Text(
Coalesce(
Text(pInput.memberfirm),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
recordid,
Text(Value.recordid),
datasourcetitle,
Text(Value.datasourcetitle),
datasourceshortdescription,
Text(Value.datasourceshortdescription),
vendorlogo,
Text(Value.vendorlogo),
licensedmemberfirm,
Text(Value.licensedmemberfirm),
country,
Text(Value.country)
),
Value
)
),
“Credential”,
ClearCollect(
col_CredentialsFeeRangeTable,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_CredsR4.dbospcredentials1r4(
//Parameters
{
feerangeorduration: 1,
filtermaxduration: Text(
Coalesce(
Text(pInput.maxduration),
“”
)
),
filterminduration: Text(
Coalesce(
Text(pInput.minduration),
“”
)
),
filterproduct: If(
IsBlank(_SelectedProductID),
Text(
Coalesce(
Text(pInput.product),
“”
)
),
_SelectedProductID
),
filtersector: Text(
Coalesce(
Text(pInput.sector),
“”
)
),
filterindustry: Text(
Coalesce(
Text(pInput.industry),
“”
)
),
filterregion: Text(
Coalesce(
Text(pInput.region),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
credentialid,
Text(Value.credentialid),
projectname,
Text(Value.projectname),
projectyear,
Text(Value.projectyear),
leadpartner,
Text(Value.leadpartner),
projectdescription,
Text(Value.projectdescription),
projectduration,
Text(Value.’projectduration(weeks)’),
feerange,
Text(Value.feerange),
memberfirm,
Text(Value.memberfirm),
credentialurl,
Text(Value.credentialurl),
product,
Text(Value.product),
sector,
Text(Value.sector),
subsector,
Text(Value.subsector),
industry,
Text(Value.industry),
region,
Text(Value.region),
leadmemberfirm,
Text(Value.leadmemberfirm)
),
Value
)
),
“DocumentLibrary”,
ClearCollect(
col_DocumentLibrary,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_DocsR4.dbospdocumentlibraryr4(
//Parameters
{
filterproduct: If(
IsBlank(_SelectedProductID),
Text(
Coalesce(
Text(pInput.product),
“”
)
),
_SelectedProductID
),
filterphase: Text(
Coalesce(
Text(pInput.phase),
“”
)
),
filteryourneed: Text(
Coalesce(
Text(pInput.yourneed),
“”
)
),
filterassettype: Text(
Coalesce(
Text(pInput.assettype),
“”
)
),
filterdocument1: Text(
Coalesce(
Text(pInput.document1),
“”
)
),
filterproductgroup2: Text(
Coalesce(
Text(pInput.productgroup2),
“”
)
),
filterdisplayclassification: Text(
Coalesce(
Text(pInput.displayclassification),
“”
)
),
filterdealspace: Text(
Coalesce(
Text(pInput.dealspace),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
assetid,
Text(Value.assetid),
assetname,
Text(Value.assetname),
assetdescription,
Text(Value.assetdescription),
assetclassification,
Text(Value.assetclassification),
assettype,
Text(Value.assettype),
documenturl,
Text(Value.documenturl),
downloadcount,
Value(Value.downloadcount),
viewcount,
Value(Value.viewcount),
documenttypel1,
Text(Value.’Document Type L1′),
documenttypel1sortorder,
Value(Value.’Document Type L1 sortorder’),
productgroupl2,
Text(Value.productgroupl2),
displayclassification,
Text(Value.displayclassification),
displayclassificationorder,
Value(Value.’displayclassification order’),
// Derived UI fields preserved from your original:
displayclassificationflat,
Blank(),
displayclassificationflatorder,
1,
displayclassificationexpand,
“Yes”
),
Value
)
),
“Agent”,
ClearCollect(
col_AIAgents_ToolsPage,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_ToolsAgentsR4.dbosptoolsandagentsr4(
//Parameters:
{
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
toolid,
Text(Value.toolid),
toolname,
Text(Value.toolname),
tooldescription,
Text(Value.tooldescription),
tooltype,
Text(Value.tooltype),
toolimage,
Text(Value.toolimage),
toolurl,
Text(Value.toolurl),
isglobal,
Text(Value.isGlobal),
countrycode,
Text(Value.countrycode),
region,
Text(Value.region),
memberfirm,
Text(Value.memberfirm),
status,
Text(Value.status),
keycontact,
Text(Value.keycontact),
languagessupported,
Text(Value.languagessupported),
usmemberfirmurl,
Text(Value.usmemberfirmurl)
),
Value
)
),
“Academy”,
ClearCollect(
col_AnalyticsAcademy,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_AcadSummR4.dbospacademysummaryr4(
//Parameters:
{
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
coursename,
Text(Value.’Course Name’),
coursedescription,
Text(Value.’Course Description’),
courseimage,
Text(Value.’Course Image’),
totalhours,
Text(Value.totalhours),
modules,
Text(Value.modules)
),
Value
)
),
“SDExpert”,
ClearCollect(
col_SD_Experts,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_StratDirectProductExpertsR4.dbospstrategydirectoryproductexpertsr4(
//Parameters:
{
filterproduct: Text(
Coalesce(
Text(pInput.product),
“”
)
),
filterproductgroup: Text(
Coalesce(
Text(pInput.productgroup),
“”
)
),
filterregion: Text(
Coalesce(
Text(pInput.region),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
userobject,
GUID(Value.userobject),
productexpertid,
Text(Value.productexpertid),
region,
Text(Value.region),
producttaxonomyid,
Text(Value.producttaxonomyid),
product,
Text(Value.product),
username,
IfError(
Office365Users.UserProfileV2(Text(Value.userobject)).givenName & ” ” & Office365Users.UserProfileV2(Text(Value.userobject)).surname,
“”
),
productgroup,
Text(Value.productgroup),
plp,
Text(Value.plp),
productowner,
Text(Value.productowner)
),
Value
)
),
“SDDA”,
ClearCollect(
col_SD_DA,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_StratDirectDAR4.dbospstrategydirectorydataanalyticsr4(
{
filterregion: Text(
Coalesce(
Text(pInput.region),
“”
)
)
}
).ResultSets
)
).Table1
),
userobject,
GUID(Value.userobject),
contactname,
IfError(
Office365Users.UserProfileV2(Text(Value.userobject)).givenName & ” ” & Office365Users.UserProfileV2(Text(Value.userobject)).surname,
“”
),
dataanalyticsexpertid,
Text(Value.dataanalyticsexpertid),
region,
Text(Value.region)
),
Value
)
),
“SDGEDMLead”,
ClearCollect(
col_SD_GEDM_Leads,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_StratDirectGEDMR4.dbospstrategydirectorygedmleadsr4(
{
filterpod: Text(
Coalesce(
Text(pInput.pod),
“”
)
)
}
).ResultSets
)
).Table1
),
userobjectid,
Text(Value.userobject)
),
Value
)
),
“News”,
ClearCollect(
col_NewsPage,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_NewsR4.dbospnewsarticlesr4(
//Parameters:
{
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
articleid,
Text(Value.md5hash),
articlename,
Text(Value.articlename),
articledescription,
Text(Value.articledescription),
articlecategory,
Text(Value.articlecategory),
articleimage,
Text(Value.articleimage),
materialname,
Text(Value.materialname),
articleurl,
Text(Value.articleurl),
articledatetime,
Text(Value.articledatetime)
),
Value
)
),
“PursuitList”,
ClearCollect(
col_SQLPursuitList,
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_PursuitsR4.dbosppursuitgalleryr4(
{
pursuit: Text(
Coalesce(
Text(pInput.pursuit),
“”
)
),
user: Text(
Coalesce(
Text(pInput.user),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
pursuitid,
Text(Value.pursuitid),
pursuitname,
Text(Value.pursuitname),
product,
Text(Value.product),
pursuitdescription,
Text(Value.pursuitdescription),
createdby,
GUID(Value.createdby),
useridarray,
Text(Value.userarray),
status,
Value(Value.active),
sector,
Text(Value.sector)
),
Value
)
),
“Basket”,
ClearCollect(
col_SQLBasketPursuit,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_PursuitBasketR4.dbosppursuitbasketr4(
//Parameters:
{
pursuit: Text(
Coalesce(
Text(pInput.pursuitid),
“”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
pursuitid,
Text(Value.pursuitid),
pursuitname,
Text(Value.pursuitname),
product,
Text(Value.product),
pursuitdescription,
Text(Value.pursuitdescription),
createdby,
GUID(Value.createdby),
useridarray,
Text(Value.userarray),
situation,
Text(Value.situation),
industry,
Text(Value.industry),
sector,
Text(Value.sector),
country,
Text(Value.country),
transformation,
Text(Value.transformation),
pullthroughpossibilities,
Text(Value.pullthroughpossibilities),
status,
Value(Value.active)
),
Value
)
),
“Pursuit”,
ClearCollect(
col_SQLPursuitNewFormCreate,
//remove just Value column
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_PursuitR4.dbosppursuitr4(
//Parameters:
{
pursuitid: Text(
Coalesce(
Text(pInput.pursuitid),
“”
)
),
pursuitname: Text(
Coalesce(
Text(pInput.pursuitname),
“”
)
),
pursuitdescription: Text(
Coalesce(
Text(pInput.pursuitdescription),
“”
)
),
situation: Text(
Coalesce(
Text(pInput.situation),
“”
)
),
industry: Text(
Coalesce(
Text(pInput.industry),
“”
)
),
sector: Text(
Coalesce(
Text(pInput.sector),
“”
)
),
product: Text(
Coalesce(
Text(pInput.product),
“”
)
),
transformation: Text(
Coalesce(
Text(pInput.transformation),
“”
)
),
pullthroughpossibilities: Text(
Coalesce(
Text(pInput.pullthroughpossibilities),
“”
)
),
country: Text(
Coalesce(
Text(pInput.country),
“”
)
),
createdby: Text(
Coalesce(
Text(pInput.createdby),
“”
)
),
abbarray: Text(
Coalesce(
Text(pInput.abbarray),
“”
)
),
documentarray: Text(
Coalesce(
Text(pInput.documentarrary),
“”
)
),
credentialarray: Text(
Coalesce(
Text(pInput.credentialarray),
“”
)
),
userarray: Text(
Coalesce(
Text(pInput.userarry),
“”
)
),
active: Value(
Coalesce(
Value(pInput.pullthroughpossibilities),
1
)
),
userid: Text(
Coalesce(
Text(pInput.userid),
“”
)
),
action: Text(
Coalesce(
Text(pInput.action),
“Update”
)
)
}
).ResultSets
)
).Table1
),
//ColumnNames
pursuitid,
Text(Value.pursuitid)
),
Value
)
),
“ProductOverview”,
ClearCollect(
col_Products,
DropColumns(
AddColumns(
Table(
ParseJSON(
JSON(
storedprocs_ProductOverviewR4.dbospproductoverviewr4(
{
filterproductgroupl1: Text(
Coalesce(
Text(pInput.productgroupl1),
“”
)
),
filterproductgroup: Text(
Coalesce(
Text(pInput.productgroup),
“”
)
),
search: Text(
Coalesce(
Text(pInput.search),
“”
)
)
}
).ResultSets
)
).Table1
),
// Column mappings
‘producttaxonomyid’,
Text(Value.producttaxonomyid),
‘product’,
Text(Value.product),
‘productdescription’,
Text(Value.productdescription),
‘productcategory’,
“”,
‘productimage’,
Text(Value.productimage),
‘productgroup’,
Text(Value.productgroup),
‘productgroupl1’,
Text(Value.productgroupl1),
‘productstatus’,
Text(Value.productstatus)
),
‘Value’
)
)
)
);