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

Can a formula or variable be put in column name of patch update part

Hi Folks,

 

I have a variable as below:

Set(varalias, First(Split(User().Email,"@")).Result)

 

I want to use this variable as column name in my collection, As:

Collect( Col1, {ID: textinput.text, varalias: Toggle.Value})

 

but it is taking varalias as text, not as a variable. Please help!

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@IMathur 
You cannot create this as a Collection or Data Table in Power Apps because the User names are not consistent.  However, you might be able to create something that is satisfactory for display purposes only using a set of nested galleries.  I don't currently have any examples to give though since I've not done this before...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

If you have a predefined list of users then you could easily create this as a SharePoint list.  But if the list of users is more dynamic then what you really need here is a Parent/Child relationship between two tables.  SharePoint won't be a good choice for that.  But you could definately do that in either CDS or Azure SQL.  But both of those would require premium licensing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

9 REPLIES 9
Pstork1
Dual Super User III
Dual Super User III

I don't believe you can create dynamic field names when creating a collection.  They need to be a static string.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

hi @Pstork1, Can this be applied in sharepoint list?

Hi @Pstork1 , My aim is to create a column by the name of the user logged-in , how can i implement this? 

@IMathur 

The answer by @Pstork1 is correct: you cannot do this in PowerApps or a SharePoint list.   Variable column names are not accepted.

Pstork1
Dual Super User III
Dual Super User III

Column names are defined when the columns are created in SharePoint.  You can't use a formula unless you are using something like PowerShell or some other programming language to create the list.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

I don't see any way to do this using Power Apps.  The closest you can come would be to add one column to record the person's name and another for the value.  Then you can filter on the person's name to get the associated values.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @mdevaney  & @Pstork1 ,

 

Below is the kind of table i need to make, True/False value will be from Toggle and Project id is the gallery item as shown below:

PROJECTIDUSER1USER2USER3
123FALSETRUEFALSE
235TRUEFALSETRUE
145TRUEFALSETRUE

 

Please help how can i create this..

@IMathur 
You cannot create this as a Collection or Data Table in Power Apps because the User names are not consistent.  However, you might be able to create something that is satisfactory for display purposes only using a set of nested galleries.  I don't currently have any examples to give though since I've not done this before...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

If you have a predefined list of users then you could easily create this as a SharePoint list.  But if the list of users is more dynamic then what you really need here is a Parent/Child relationship between two tables.  SharePoint won't be a good choice for that.  But you could definately do that in either CDS or Azure SQL.  But both of those would require premium licensing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,475)