cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vieri72
Level: Powered On

save in sql server

Hi everybody I am going to create an application to manage the fitting room with a sqlserver database. to extract the data i used a view and i would like to know how to record in the database. dexieme point to change the color of the text according to the value. thank you

9 REPLIES 9
Dual Super User
Dual Super User

Re: save in sql server

The first thing to check is to make sure that the SQL view involved is configured to allow updates.  Many SQL views are created to provide limited readonly access to pre-joined data.  Because they often involve multiple tables the logic to do updates or inserts is often overly complex.  As a result SQL views must be specifically configured to allow updates.  If the view you are using isn't configured that way you won't be able to insert or update records in the database using the views.  In that case you'll need to create additional connections that use the underlying tables and update them using Patch statements.

 

I'm not sure what your other question is asking.  Could you clarify?



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

Re: save in sql server

Hi @vieri72 ,

Could you describe more clearly about "how to record in the database. dexieme point to change the color of the text according to the value"?

Do you want to update data to sql server or display data in PowerApps?

If you want to display data and change a label's color acoording to its value, I suggest you use the IF statement.

For example:

Set the label's Fill: If(ThisItem.fieldname>8,RGBA(255, 255, 255, 1),RGBA(255, 0, 0, 1))712.png

Then , the label's color will change according to one field's value.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vieri72
Level: Powered On

Re: save in sql server

I want to enter a number and its color must change according to my condition

vieri72
Level: Powered On

Re: save in sql server

thank you for the answer .

my eyesight does not allow me any updates

for second point I want to enter a number and its color must change according to my condition

vieri72
Level: Powered On

Re: save in sql server

i think it's done in stored procedure .but i do not know how to do it

Community Support Team
Community Support Team

Re: save in sql server

Hi @vieri72 ,

SQL Sever do not have the fields about color.

The justify of color shoule happen in PowerApps.

You could use If statement to justify the data and display different color according to differeny number.

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vieri72
Level: Powered On

Re: save in sql server

 
Super User
Super User

Re: save in sql server

Perhaps your field 'NombreD_Article' is a text field (or is being returned as a text field by the SQL view)?

Could you try If(Value(ThisItem.NombreD_Article)<=6...

I.e. wrap 'NombreD_Article' in a Value funtion to change the data type to numeric.

Alternately modify the SQL query with a CAST function to ensure the output is numeric.

vieri72
Level: Powered On

Re: save in sql server

thank you .

the field is a numeric.

it takes the color of the 1 value of the if it does not take into account the other parameters

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,921)