web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / List Device Camera ID
Power Apps
Answered

List Device Camera ID

(0) ShareShare
ReportReport
Posted on by 180

Hi everyone, hoping for some help here.

Working on a app for employees doing site visits and inspections. Basically they create an entry on a SharePoint list for the visit, record information and upload photos.

Everything is working fine but I do have one issue. I use a camera control to take photos within the app and use a Flow to attach them to the appropriate entry on the list (Side note, is there a way to do this without a flow? I couldn't figure it out)

The issue I have is with the camera ID. On app start, I set a variable called cameraIndex to 0 and use that to set which camera the app is using. I have two icons on the screen, one which increases cameraIndex by 1 and one which decreases it by 1 (to a minimum of zero.) This works fine except I have no way to know what the max camera ID of the end user's device. They can cycle through until they get an error message and then go back a step.

Is there a way I can know which camera IDs are available? It bugs me because the app is pretty polished except for this one feature I can't figure out.

Categories:
  • mmollet Profile Picture
    3,187 on at

    You could possibly use IfError(...your code here..., -1) in your math for your button that way if it produces an error it will catch said error and auto decrease the value by 1 for you. Should surpress the error as well. Worth a shot.

  • Verified answer
    RTW Profile Picture
    180 on at

    No idea how I missed this but there is a property called AvailableDevices which,  obviously, does exactly what I need. For future reference, this is how I have it set up.

    In OnStart, I have the following

    Set(
    	cameraIndex, 
    	Min(
    		Camera1.AvailableDevices, 
    		Id
    	)
    )


    I have two buttons on the camera screen with OnSelect the following

    Set(			//Decreases cameraIndex variable by 1 to minimum available value
    	cameraIndex, 
    	Max(
    		Min(
    			Camera1.AvailableDevices, 
    			Id
    		),
    		cameraIndex -1
    	)
    )
    
    Set(			//Increases cameraIndex variable by 1 to max available value
    	cameraIndex, 
    	Min(
    		Max(
    			Camera1.AvailableDevices, 
    			Id
    		),
    		cameraIndex +1
    	)
    )


    And Camera1.Camera is set to cameraIndex

  • oyepanky Profile Picture
    567 on at

    Hi Bro,

     

    Please check out this video for camera control. 

    TimeSheet Selfie Verify Option In PowerApps || Camera Option In PowerApps - Part 15
    https://youtu.be/AnZKwrRYtcE

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard