Hi everyone.
So I want to take a picture with the camera, select a field in CDS from a dropdown and then patch that selected field.
I have a dropdown with say Items: ['field_a', 'field_b', 'field_c'] (referencing an entity in CDS)
Now, I could use multiple nested if statements for the Patch function:
If (Dropdown1.Selected.Value = 'field_a')
Patch(EntityName, Gallery1.Selected, {'field_a': photoVariable}), and so on
But there has to be a better way, no!?
I have tried multiple things without any success, get errors for all of them:
Patch(EntityName, Gallery1.Selected, {Dropdown1.Selected.Value: photoVariable})
Patch(EntityName, Gallery1.Selected, {'Dropdown1.TextValue': photoVariable}) and so on
Another thought was to reference the fields in the dropdown in another way, but no success there either.
Do you have any ideas of how I can get rid of all the If statements?
Thanks.
Hi @POJA85 ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
HI @POJA85 ,
I have done a blog on storing and viewing images which although SharePoint specific refers to the method of storing a photo as Base64 text in a multi-line text field. I am not sure on CDS, but you might try this method.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.