I'm trying to add a condition when setting a datasource. I have embedded a form into a power app and have done the following to the datasource:
If(!IsBlank(Param("RiskID")),
If(VarShortNameTemp = "AI", 'Asphalt & Industrial Products, Retail, BD & TSL');
If(VarShortNameTemp = "AP", 'Asia Pacific');
If(VarShortNameTemp = "AR", 'Atlantic Region');
If(VarShortNameTemp = "CG", 'Corporate Groups');
If(VarShortNameTemp = "CT", 'Canadian Manufacturing & Technical Services');
If(VarShortNameTemp = "CO", 'Corporate & Operations Technical Services');
If(VarShortNameTemp = "CC", 'Canadian Thermal & CHO');
If(VarShortNameTemp = "MP", 'Major Projects');
If(VarShortNameTemp = "MO", 'Midstream Operations');
If(VarShortNameTemp = "UR", 'US Refining');
If(VarShortNameTemp = "WC", 'Well Delivery & Conventional');
)
This would be great but of course the code has a squiggly red line informing me that the "The function 'IF' has some invalid arguments. true_value: An expression that provides the result of If when the condition is true."