Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Using the app id as a a key in a record?

(0) ShareShare
ReportReport
Posted on by 634

I'm building a settings component and I want to be able to reuse the component for other apps(obviously the purpose of a component). However, I want to be able to allow the user to save the settings from this component so the next time they load the app the settings load as well. since this data source could be used to hold settings for multiple apps I'm thinking that the app id might be the right piece of data to use as a key to determine which settings should be loaded into the component when an app loads. Is there a way to get and record this app id? Or is there possibly a better/easier piece of data to use?

Categories:
  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at
    Re: Using the app id as a a key in a record?

    Then theoretically you would just need to keep track of the AppID and the style in a SP list. Then have the app check that list in OnStart for the theme. You would just do a Lookup on the AppID to your list.

  • Future_Vision Profile Picture
    634 on at
    Re: Using the app id as a a key in a record?

    @BrianS 

    Thanks. I'm not too concerned about the user info since this component is really only for the administrator/designer. My primary concern is that when the app loads it loads the correct 'theme' for the app. Those values would be retrieved from a data source and that data source would need to have record of which app which styles get applied too.

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at
    Re: Using the app id as a a key in a record?

    If you want to automate the process, you would need to build the automation. You would probably need to set up a table in Sharepoint that would hold an ID for the user, an App Identifier and the data you need to capture and retrieve. You would have to set a variable in the OnStart to hold the app identifier - you could use the AppID, but you would need to manually add that to each app you want to have this functionality. Then you would need to capture the User info. That is available either from the User function or the 365 connector. Then you could use that info to populate the Sharepoint list along with the other data you need to capture. 

  • Future_Vision Profile Picture
    634 on at
    Re: Using the app id as a a key in a record?

    @schuess3 I'm not familiar with those methods. I was simply thinking that the component would leverage a form and the user would save on submit.

  • Future_Vision Profile Picture
    634 on at
    Re: Using the app id as a a key in a record?

    @BrianS I know you can get the ID from there but how would you retrieve it in the app. It would need to be some type of automated process so the user of the app can just plug n play the component and have it save with the app id.

  • schuess3 Profile Picture
    353 on at
    Re: Using the app id as a a key in a record?

    If you are planning on using SaveData and LoadData, to cache the settings, I don't believe this is possible as those files are encrypted and not accessible by other apps. In case you were headed that way. 

     

    "The device's built in app sandbox facilities are used to isolate saved data from other apps." -src

     

    matt

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at
    Re: Using the app id as a a key in a record?

    The app ID would be a unique identifier, so that should work. If you click the three dots next to the app name in the list of Powerapps you can select "Details' - the app ID is listed there

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard