is there any way I can set value of bool param StartFromBeginning from appsetting ? %StartFromBeginning% works for string not for bool
[FunctionName(nameof(MyAzureFunction))]
public async Task RunAsync([CosmosDBTrigger(
databaseName: "myCosmosDbName",
collectionName: "myCollectionName",
ConnectionStringSetting = "cosmosConnectionString",
LeaseCollectionName = "leases",
CreateLeaseCollectionIfNotExists = true,
MaxItemsPerInvocation = 1000,
StartFromBeginning = true)]IReadOnlyList<Document> documents)
{
....
}
As far I know, it is not possible to pass the values as Boolean to the Parameters in function definition by fetching from
local.settings.jsonbecauseStartFromBeginningproperty in theCosmosDBTriggerattribute supports only constant values.The values must be directly passed in the function definition for Boolean variables.
I have declared
StartFromBeginningvalue inlocal.settings.json:""(as a string) to the Boolean variable.Hence, it is recommended to use as shown below: