cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
justair007
Helper I
Helper I

Update specific column for a record

Hi,

I have gallery with a delete button on each record. When the user presses the button I want to update the column "Active" in my table to false.

 

I know this is wrong but here is my attempt:

Update('[dbo].[tsSurveyQuestions]',ThisItem.id_SurveyQuestion,{Active: false})

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
justair007
Helper I
Helper I

Oops, I figured it out 🙂

 

UpdateIf('[dbo].[tsSurveyQuestions]',id_SurveyQuestion=ThisItem.id_SurveyQuestion,{Active: false})

 

View solution in original post

4 REPLIES 4
justair007
Helper I
Helper I

Oops, I figured it out 🙂

 

UpdateIf('[dbo].[tsSurveyQuestions]',id_SurveyQuestion=ThisItem.id_SurveyQuestion,{Active: false})

 

View solution in original post

@justair007 
Your solution looks good to me.  It seems like disambiguation between two datasources with similar column names is giving you trouble today 🙂

@mdevaney  Yea, I'm trying to do a better job at prefixing my primary keys with Id_ and for my foreign keys, proceeding it with _Id

Example:

PK     Id_Question

 

FK      Question_Id

 

Is this a good practice?

 

Thank you

@justair007 
It all comes down to personal preference.  So long as you stick to a consistent method almost anything is fine.  My preferred method is:

(Questions Table)

PK: ID

 

(Answers: Table)

FK: QuestionID

 

---
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."

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (59,248)