I have a model driven app using dataverse, there are 2 tables:
"Company", with columns:
- company name
- GST registered, this is a Yes/No OptionSetValue data type column
"Tax Invoice", with columns:
- company, this look up the "company" table
- Amount Excl GST
- GST amount
I want it so that if a company is GST registered, the "GST registered" column would be tick to be "Yes', and then when I input a new record of tax invoice in the "Tax Invoice", if the record below to a GST registered company, the "GST amount" column will be calculated using below power fx (preview) function:
If(Company.'GST Registered' = "Yes",'Amount Excl GST'*0.1,0)
This gives error saying that OptionSetValue cannot be compared. See attached screenshot
I have tried many alternative ways, like adding .value behind, doesnt work and says no such value. Adding text(Company.'GST Registered') = "Yes", then it says this is not supported.
Can someone please have a look and give a solution?