cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CGZoe215
Frequent Visitor

Image fields are not appearing under Dynamic content

I have one list where below columns. I want to use thumbnails columns to send a dynamic emails. But this thumbnail columns are not appearing on dynamic content list. How to get this info ? 

 

CGZoe215_0-1612774086692.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @CGZoe215,

 

The thumbnail/image data type is pretty new in SharePoint. It looks like it is not supported yet in the default actions.


However, you should be able to workaround this with an HTTP request to SharePoint, via the REST API. Below is an example of that.

 

1. Add a Send an HTTP request to SharePoint action. Use a Get request and the following URI field value.

 

_api/web/lists/getbytitle('@{variables('ListTitle')}')/items(1)

 

restapihttpimageproperty.png

 

2. Add a compose action to collect the BD IMG field value. 

 

outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']['BD_IMG']

 

compose_bdimgfield.png

 

3. Add a Parse JSON action to read the image url. 

 

{
    "type": "object",
    "properties": {
        "type": {
            "type": "string"
        },
        "fileName": {
            "type": "string"
        },
        "nativeFile": {
            "type": "object",
            "properties": {}
        },
        "fieldName": {
            "type": "string"
        },
        "serverUrl": {
            "type": "string"
        },
        "serverRelativeUrl": {
            "type": "string"
        },
        "id": {
            "type": "string"
        }
    }
}

 

bdimgfieldjson.png

 

4. Add a compose action. Use a concat function to generate a hyperlink for the image.

 

concat(body('Parse_JSON')?['serverUrl'],body('Parse_JSON')?['serverRelativeUrl'])

 

concatserverurlimage.png

 

Hope this helps a bit?

 

View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @CGZoe215,

 

The thumbnail/image data type is pretty new in SharePoint. It looks like it is not supported yet in the default actions.


However, you should be able to workaround this with an HTTP request to SharePoint, via the REST API. Below is an example of that.

 

1. Add a Send an HTTP request to SharePoint action. Use a Get request and the following URI field value.

 

_api/web/lists/getbytitle('@{variables('ListTitle')}')/items(1)

 

restapihttpimageproperty.png

 

2. Add a compose action to collect the BD IMG field value. 

 

outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']['BD_IMG']

 

compose_bdimgfield.png

 

3. Add a Parse JSON action to read the image url. 

 

{
    "type": "object",
    "properties": {
        "type": {
            "type": "string"
        },
        "fileName": {
            "type": "string"
        },
        "nativeFile": {
            "type": "object",
            "properties": {}
        },
        "fieldName": {
            "type": "string"
        },
        "serverUrl": {
            "type": "string"
        },
        "serverRelativeUrl": {
            "type": "string"
        },
        "id": {
            "type": "string"
        }
    }
}

 

bdimgfieldjson.png

 

4. Add a compose action. Use a concat function to generate a hyperlink for the image.

 

concat(body('Parse_JSON')?['serverUrl'],body('Parse_JSON')?['serverRelativeUrl'])

 

concatserverurlimage.png

 

Hope this helps a bit?

 

Thanks for helping . I am gettig below error at the time of parseJSON.  How did you generate scheme here?

 

InvalidJSON. The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: o. Path '', line 0, position 0.'.

 

CGZoe215_0-1612799076800.pngCGZoe215_1-1612799132999.png

 

Expiscornovus
Super User
Super User

Hi @CGZoe215,

 

Updated this instruction, it had some errors in it.

 

Go to one of your flow runs. 

 

1. Navigate to the Compose action. Expand it.

composeflowrun.png

 

2. Copy paste the outputs of the body of that action (this will be your sample)

copypastecompose.png

 

3. In your Parse JSON action click Generate from sample

generatefromsample.png

 

4. Paste the earlier copied sample. Click Done

samplejsonpayloaddone_2.png

 

This should result in your json schema.

Expiscornovus
Super User
Super User

Hi @CGZoe215,

 

Thanks for adding the screenshot. It looks like you copied the expression as regular text, instead of pasting it in as an expression.

 

1. Click the fx button in the compose action in the right top corner

compose_bdimgfield_02.png

 

2. Paste the expression

compose_bdimgfield.png

 

If all goes well you should see the fx button in front of your expression.

fxbuttoninfrontofit2.png

 

Btw, I see I also made a couple of errors in the instructions above for generating the json schema. I will adjust that now 🙂

 

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,783)