Hi community,
I'm creating a power automate flow that inserts records in a dataverse table.
Challenge: The dataverse table contains fields that are connected to option sets. In order to insert the new row, I've tried to use the text value as custom value, but the execution of the flow is failing. Apparently I need to insert the ID of the value, not the text. In order to do so, I would need to dynamically get the available ID's of the option set, filter them by the one I want to insert, and then proceed adding the row, but I cannot really get access to the ID's of the option set.
The trigger of the flow is manual. The user has the option to define the values of each field that needs to be inserted as a row in the table "Touchpoints". As an example, there is a field called "Campaign" that has an option set in the Dataverse. If the user selects "home" in the manual trigger, I try to pass the text "home" as custom value (because I want it to be dynamic for future executions), but flow is asking me to use the ID of the option set for "seat"...
The 'inputs.parameters' of workflow operation 'Add_a_new_row' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/trg_campaign' is required to be of type 'Integer/int32'. The runtime value '"home"' to be converted doesn't have the expected format 'Integer/int32'.
As a solution, I tried to list all the OptionSets in my dataverse, to detect the "Campaign" dataset, and try to list it's ID's, but I got the following error:
Does any one have a solution to get OptionSet IDs on the fly that can then be used to insert a row in dataverse that has an OptionSet field in the record?
Thanks and regards