cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Image capture coming Bing maps in a Collection

Hello every body

I need your help.

 

I have an apps which send an email with an attachements coming from the camera2.

Office365Outlook.SendEmailV2( TextInput4.Text; "Anomalie " ; "Bonjour"; { Attachments: { Name: "Photo.jpg"; ContentBytes: Camera2.Photo; '@odata.type': "" } } )

 

Now, I want to send more attachements like 2 pics, and an image capture of my localisation.

I use BingMaps.GetMapV2("CanvasLight";15;Location.Latitude;Location.Longitude) ,  it's ok in a simple Image.

 

So I create a collection named "ColImage" in my camera 

Onselect= ClearCollect(colImage;({ Name: "Photo.jpg";ContentBytes: Camera2.Photo;'@odata.type': ""}))

And I add a gallery with  Item= ColImage

 

My question is : How put my Image of my localisation in the Collection "ColImage" ?

 

Thx

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @bertrandedin :

"And" is a Logical operator,it returns true if all of its arguments are true.

If you want to execute formula 2 after executing formula 1, you should use ";;".Something like:

Collect( colImage; { Name: "localisation.jpg"; ContentBytes: BingMaps.GetMapV2("CanvasLight";15;Location.Latitude;Location.Longitude); '@odata.type': ""} ) ;;
UpdateContext({MessPhoto:true})

Best Regards,

Bof

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @bertrandedin :

You only need to use the collect function to save the map to the collection:

Collect(
  colImage;
  { 
   Name: "localisation.jpg";
   ContentBytes: BingMaps.GetMapV2("CanvasLight";15;Location.Latitude;Location.Longitude);
   '@odata.type': ""}
)

 I've made a test for your reference.My send an email button's OnSelect property:

Collect(
    colImage,
    {
        Name: "localisation.jpg",
        ContentBytes: BingMaps.GetMapV2(
            "CanvasLight",
            15,
            Location.Latitude,
            Location.Longitude
        ),
        '@odata.type': ""
    }
);
Office365Outlook.SendEmailV2(
    "bof@XXXXXX.com",
    "Anomalie ",
    "Bonjour",
    {Attachments: colImage}
)

The Result:

1.JPG

Best Regards,

Bof

Good 🙂

 

one more question,

I want combine 2 insctructions in a same Buton, the first to collect the image and the second to appear a label with the function visible True with a variable call MessPhoto

Onselect= Collect( colImage; { Name: "localisation.jpg"; ContentBytes: BingMaps.GetMapV2("CanvasLight";15;Location.Latitude;Location.Longitude); '@odata.type': ""} ) And UpdateContext({MessPhoto:true})

 

It's a a fail, have you got as idea why ?

Hi @bertrandedin :

"And" is a Logical operator,it returns true if all of its arguments are true.

If you want to execute formula 2 after executing formula 1, you should use ";;".Something like:

Collect( colImage; { Name: "localisation.jpg"; ContentBytes: BingMaps.GetMapV2("CanvasLight";15;Location.Latitude;Location.Longitude); '@odata.type': ""} ) ;;
UpdateContext({MessPhoto:true})

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (18,580)