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

Font size and weight custom settings

Hi, I am trying to build settings popup with option to modify app font size and weight. I need to save all the custom settings for every User() of this app. Any good idea to make this work? 

1 ACCEPTED SOLUTION

Accepted Solutions
poweractivate
Super User
Super User

@GTR95 You can have something as simple as a SharePoint List of settings. You can have email as one column, settings as the other column You can check if User().Email exists in SP List in email column. If it does, read the data from other column and just apply the settings. If it does not exist, save the preferences as settings to SP List. You can do this kind of create new item or edit existing item using e.g. Patch function

 

 

 

 

Patch( DataSource, BaseRecord, ChangeRecord1)

 

 

 

 In the above, if BaseRecord is Defaults(), the Patch will create a new item instead. If BaseRecord is an existing Record instead, the Patch will instead modify that existing record. So same formula above can do both things based on what the value of BaseRecord above is. 

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#modify-or-crea...

Modify or create a record in a data source

Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])

  • DataSource – Required. The data source that contains the record that you want to modify or will contain the record that you want to create.
  • BaseRecord – Required. The record to modify or create. If the record came from a data source, the record is found and modified. If the result of Defaults is used, a record is created.
  • ChangeRecord(s) – Required. One or more records that contain properties to modify in the BaseRecord. Change records are processed in order from the beginning of the argument list to the end, with later property values overriding earlier ones.


 

 

Check if above helps as starting point.

View solution in original post

3 REPLIES 3
poweractivate
Super User
Super User

@GTR95 You can have something as simple as a SharePoint List of settings. You can have email as one column, settings as the other column You can check if User().Email exists in SP List in email column. If it does, read the data from other column and just apply the settings. If it does not exist, save the preferences as settings to SP List. You can do this kind of create new item or edit existing item using e.g. Patch function

 

 

 

 

Patch( DataSource, BaseRecord, ChangeRecord1)

 

 

 

 In the above, if BaseRecord is Defaults(), the Patch will create a new item instead. If BaseRecord is an existing Record instead, the Patch will instead modify that existing record. So same formula above can do both things based on what the value of BaseRecord above is. 

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#modify-or-crea...

Modify or create a record in a data source

Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])

  • DataSource – Required. The data source that contains the record that you want to modify or will contain the record that you want to create.
  • BaseRecord – Required. The record to modify or create. If the record came from a data source, the record is found and modified. If the result of Defaults is used, a record is created.
  • ChangeRecord(s) – Required. One or more records that contain properties to modify in the BaseRecord. Change records are processed in order from the beginning of the argument list to the end, with later property values overriding earlier ones.


 

 

Check if above helps as starting point.

Yeah, I was thinking about that, just wanted to see if there are any better solutions. Thank You.

@GTR95 

There is also the idea of using SaveData and LoadData in https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata that could come to mind, but for SaveData and LoadData, this is specific to the device, and this is not specific to the user, so this is probably not an effective solution and is also why I did not mention it first. However in case this fits your requirement you can consider it.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,819)