Hello - I'm imbedding a PowerApp in PowerBI. The connection is established.
When the Submit button is pressed, a flow (CSVAttachement) should trigger, however, in adding logic to pass data from PowerBI, I'm facing an error (JSON parsing error, expected 'number' but got 'string'). The issue is due to PowerBI sending NULL or Blank values in some of the fields.
I know I have to complete a combination of creating a collection, using if then statements and pass using the JSON command however I can't find the right systax. It has been several days now and I am turing to the Community for help.
My code for the submit button:
Collect(
check_null,
ShowColumns([@PowerBIIntegration].Data, Environment,'Created at'),
{'Created at': If(
IsBlankOrError('Created at'.Text),
0,
Value('Created at'.Text)
),
Environment: If(
IsBlankOrError(Enviornment.Text),
0,
Value(Environment.Text)
)
}
);
CSVAttachement.Run(
JSON(
check_null,
JSONFormat.IncludeBinaryData
),Dropdown1.SelectedText,
Comments.Text
)