Creating a map instead of many if statements

PHOTO EMBED

Mon Apr 15 2024 14:01:53 GMT+0000 (Coordinated Universal Time)

Saved by @nishpod

mapp = {"Ten Yearly":3650,"Five Yearly":1825,"Four Yearly":1460,"Three Yearly":1095,"Two Yearly":730,"Yearly":365,"Quarterly":90,"Six Monthly":183,"Two Monthly":60,"Monthly":30,"Fortnightly":14,"Weekly":7,"TBC":7,"Daily":1};
//
for each  rec in Testing_Requirements[Asset_s = input.Asset]
{
	freq = rec.Frequency_Required;
	mappe = mapp.get(freq);
}
content_copyCOPY