hi @PijushRoy , Because I'm not familiar with the specific codes you've implemented and the interface you've built in your app, I'll make a few assumptions with the approach outlined below:
1. Assuming you have a collection (colKPIs) that pulls data from the SQL table:
ClearCollect(colKPIs, '[dbo].[YourSQLTable]');
2. Form to Update the Forecast:
Let's say you have a form where the user updates the forecast for a specific KPI for January.
3. Update Button Logic:
When the user updates the forecast for January, you use the following logic to update all months:
// Assuming txtKPI is the TextInput for the KPI and txtForecast is the TextInput for the Forecast
// colKPIs is your collection that has all the KPI data from the SQL table
ForAll(
Filter(colKPIs, KPI = txtKPI.Text), // Filter the collection for the specific KPI
Patch(
'[dbo].[YourSQLTable]', // Your SQL table
LookUp('[dbo].[YourSQLTable]', KPI = txtKPI.Text && Month = ThisRecord.Month), // Find the record for each month for the specific KPI
{Forecast: txtForecast.Text} // Update the Forecast field
)
);
// Optionally refresh the collection to reflect changes
ClearCollect(colKPIs, '[dbo].[YourSQLTable]');
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.