Skip to content

Instantly share code, notes, and snippets.

@1504168
1504168 / PROPERTIESCODEGENERATOR
Last active June 2, 2022 03:37
Properties(Getter and Setter creator from variable declaration line). Dependent on PROPERTYCODEGENERATOR
PROPERTIESCODEGENERATOR = LAMBDA(AllVariableDeclarationCode,[IsOnlyGetter],LET(
AllPropertyCode, MAP(AllVariableDeclarationCode,LAMBDA(CurrentVariableDeclaration,PROPERTYCODEGENERATOR(CurrentVariableDeclaration,IsOnlyGetter))),
Result,REDUCE("",AllPropertyCode,LAMBDA(FinalCode,CurrentPropertyCode,FinalCode & CHAR(10) & CHAR(10) & CurrentPropertyCode)),
Result
)
);
/*Count of occurence and SumIfs From two different Column
@Author: Md.Ismail Hosen
@Email: 1997ismail.hosen@gmail.com
@Param: NameData : This is the column which has header text
@Param: ValueData : This is the column from which we need to SumIf
*/
CountAndSumReport=LAMBDA(NameData,ValueData,
LET(
UniqueFirstData,UNIQUE(NameData),
CHOOSE({1,2,3},UniqueFirstData,COUNTIF(NameData,UniqueFirstData),SUMIF(NameData,UniqueFirstData,ValueData))