Hi,
I have built a flow where I managed to extract values from "userDefinedFields" so that I can send email to emailadresses coming from "Epostadresse mottaker av egenkontroll" (a user defined field). I want to send different emails to the different adresses, and I want to build the body of the email using some of the other user defined fields.
So I have tested it, and it worked - until I changed a value (text basically) in the system where the data comes from.
So I am using indexing (hardcoded index...or something?) to get the values using a expression like: items('Apply_to_each')?['data']['userDefinedFields']?[2]?['value']
This expression did extract the email adress, because "Epostadresse mottaker av egenkontroll" was the third user defined field in the data. But when I changed some text in one of the fields, the result attached showed that the user defined field "Epostadresse mottaker av egenkontroll" now was number two.
So the order of the fields are not set or consistent.
Is there a way to extract these values based on the name of the user defined field, and not using [0] og [1] or [2]?