Announcements
Set( var_SearchResults, Legionella_dataSQL.dboSearchPatientDetailsByName( { Forename: txt_SearchByNameForename.Text, Surname: txt_SearchByNameSurname.Text } ).ResultSets.Table1 ); Set( MyTable, ForAll( var_SearchResults,// extract JSON from table1 { Forename: Text(ThisRecord.forename), Surname: Text(ThisRecord.surname) } ) );
ClearCollect( col_demo_data, With( { // 1) Base table from your stored procedure/API // Each row has a single UntypedObject column named "Value" // Note: sometimes you need JSON() around the proc call, sometimes not. // It depends on whether your connector returns a Dynamic Object. // If one fails, try the other pattern. data: Table( ParseJSON( JSON( MyDatabase.RunMyStoredProc().ResultSets.Table1 ) ) ) }, // 2) Safely project typed columns and drop the "Value" carrier IfError( DropColumns( AddColumns( data, // Make sure to use the exact field names from your JSON/proc // Example JSON keys: ACCOUNT_OWNER_NAME, CHANNEL, EMPLOYEE_ID, JOINING_DATE, ACTIVE // TEXT ACCOUNT_OWNER_NAME, Text(ThisRecord.Value.ACCOUNT_OWNER_NAME), CHANNEL, Text(ThisRecord.Value.CHANNEL), // NUMBER (INT/DECIMAL → Value()) EMPLOYEE_ID, Value(ThisRecord.Value.EMPLOYEE_ID), SALARY, Value(ThisRecord.Value.SALARY), // DATE (ISO date string → DateValue) JOINING_DATE, DateValue(ThisRecord.Value.JOINING_DATE), // BOOLEAN (coerce true/false; adjust if your value returns text) ACTIVE, If( IsBlank(ThisRecord.Value.ACTIVE), false, Boolean(ThisRecord.Value.ACTIVE) ) ), "Value" // remove the original untyped object column ), // 3) Error fallback: return empty table so collection won't break Table() ) ) )
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 530
WarrenBelz 459 Most Valuable Professional
Haque 314