Hello Everyone,
I am working on enhancing some of my older projects and simultaneously I am updating my codes from BQL to FBQL for better readability and using some new functions of FBQL. I have come across a piece that I have used IsNull<,>. I am wondering how can I use IsNull in FBQL.
Below is the piece of code I have converted to FBQL (the BQL version was working fine) I tried using “Use<>” before “IsNull<>” to mix use BQL with FBQL but didn’t work either.
HCLPMCostProjectionView costProjection = SelectFrom<HCLPMCostProjectionView>
.Where<Brackets<HCLPMCostProjectionView.projectID.IsEqual<@P.AsInt>>
.And<Brackets<HCLPMCostProjectionView.taskID.IsNull.Or<HCLPMCostProjectionView.taskID.IsEqual<IsNull<@P.AsInt, HCLPMCostProjectionView.taskID>>>>
.And<Brackets<HCLPMCostProjectionView.costCodeID.IsNull.Or<HCLPMCostProjectionView.costCodeID.IsEqual<IsNull<@P.AsInt, HCLPMCostProjectionView.costCodeID>>>>
.And<Brackets<HCLPMCostProjectionView.accountGroupID.IsNull.Or<HCLPMCostProjectionView.accountGroupID.IsEqual<IsNull<@P.AsInt, HCLPMCostProjectionView.accountGroupID>>>>
.And<Brackets<HCLPMCostProjectionView.inventoryID.IsNull.Or<HCLPMCostProjectionView.inventoryID.IsEqual<IsNull<@P.AsInt, HCLPMCostProjectionView.inventoryID>>>>
.And<Brackets<HCLPMCostProjectionView.tranPeriodID.IsLessEqual<@P.AsString>>
.And<Brackets<HCLPMCostProjectionView.tranDate.IsLessEqual<@P.AsDateTime>>>>>>>>>
.View.Select(Base, line.ProjectID, taskID, costCodeID, accountGroupID, inventoryID, documentExt.UsrHCLTranPeriodID, document.Date).FirstOrDefault();
and error snip