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

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
Pstork1
Dual Super User III
Dual Super User III

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.
v-yutliu-msft
Community Support
Community Support

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.

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

vieri72
Frequent Visitor

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
Frequent Visitor

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

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.

 

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
Frequent Visitor

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
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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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