how to create a new form if a user selects a row in the power BI table visual and there is no entry for that row, this is my current formula that displays the form if there is a SharePoint list entry for the row - LookUp('Sales', Text(ID) = First(PowerBIIntegration.Data).Index) . *ID is the index column of my SharePoint list
I have asked chatGPT and it has provided the following formula, but the power app has errors - 'If' function has invalid arguments, 'NewForm' and 'EditForm' are not showing as valid functions in the formula. I have no idea why?
If (isEmpty(First (PowerBIIntegration.Data).Index), NewForm(Form), EditForm (LookUp ('Sales', Text (ID) = First (PowerBIIntegration.Data).Index)))
even when I shorten the formula to - If(IsEmpty('Sales') - there are still invalid arguments for 'If'. Any advice?