Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Canvas app - get column name

(0) ShareShare
ReportReport
Posted on by 4
Hello,
 
My canvas app is built on a SharePoint list with over 90 columns that correspond to a list of questions. After the initial user input, another user will revise the answers and comment against the answer as necessary.
 
I have built a form and on each datacard I would like a button that opens a text input popup for the comment. This text input would then be written to another Sharepoint list ('Comments'), with an identifier for the question being answered (Column Name), the record being commented on (via a GUID created when the initial user answers the questions) the comment and the commenter.
 
|| Record GUID || Question ID || Comment || Commenter||
 
Rather than build 90+ buttons, each with a unique identifier that corresponds to the question, I'd like to build a generic button that will 'get' the question identifier (ie the column name), set it as a Variable then write it to the Comments SharePoint List.
 
Is there a way I can 'get' the column name?
 
Thanks,
 
Kirsty
  • MS.Ragavendar Profile Picture
    1,228 on at
    Canvas app - get column name
     
    The QID i mentioned as the Quantity ID in short form my bad.
     
    Is the issue resolved from your side - Kindly accept the solution or still facing any challenges- kindly revert me back with the queries.
  • Suggested answer
    KirstyC Profile Picture
    4 on at
    Canvas app - get column name
    I found the answer in case anyone else goes searching for this kind of thing.
     
    Call is : Set(varQID,Parent.DisplayName)
  • KirstyC Profile Picture
    4 on at
    Canvas app - get column name
     
    Thanks, but how does varQId get the column name? QID is not a function as far as I can see?
  • Suggested answer
    MS.Ragavendar Profile Picture
    1,228 on at
    Canvas app - get column name
     
    I believe The Form control which you created is connected to relevant column ( each question) in the backend system (sharepoint list).
     
    Create a pop up screen for entering comments and submit button to submit the comment.
     
    On each datacard add one button which will open the popup menu, so this helps you to acheive the generic functionality .
     
    On button click event:
     
    UpdateContext({varRecordId:ThisItem.GUID,varQId:ThisItem.QID,varModifiedBy:ThisItem.Commenter, varshowPopUp:true});
     
    If you are using screen use the navigate function or if you used just controls set the visible property based on the varshowPopup variable.
     
    Popup Screen / Control
     
    Submit Button On click 
     
    Patch(DS, Defaults(DS),{ // patch the column values from the updatecontext variables, Commenter: texbox.text});
    Reset(txtboxcontrol);
    UpdateContext({varshowPopup :false});
     
     
    enable the button if comment is not blank in the display mode or use notify("error") accordingly.
     
     
    I hope this helps...!
     
    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item
     
     
     
     
     
     

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,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,734 Most Valuable Professional

Leaderboard