Re: [Qgis-user] Index attribute no longer updated automatically

2022-02-21 Thread Johanna Botman
Thanks Nyall,

This works in 3.16 but not in 3.22. Do I need to change settings on my server?



Johanna Botman

Assets / GIS Officer - Melton City Council





-Original Message-
From: Nyall Dawson 
Sent: Tuesday, 22 February 2022 12:02 PM
To: Johanna Botman 
Cc: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Index attribute no longer updated automatically

[You don't often get email from nyall.daw...@gmail.com. Learn why this is 
important at http://aka.ms/LearnAboutSenderIdentification.]

On Mon, 21 Feb 2022 at 15:08, Johanna Botman  wrote:
>
> Hi,
>
>
>
> Another QGIS 3.22.3 question.
>
>
>
> I have layers that come from a MSSQL database. Those tables were loaded into 
> SQL using Easy Loader (I know, shh!) so they have the MI_PRINX attribute.
>
> In past versions of QGIS, this MI_PRINX attribute was updated automatically 
> when a new feature is saved in a layer. That has stopped in 3.22.
>
>
>
> In my settings when a new feature is created, the default behaviour of 
> Suppress attribute from pop-up after feature creation is not ticked, so a new 
> feature created does open a pop-up box. The attribute for MI_PRINX is Orange 
> and there is a small orange x on the right hand side.

Sounds like your database table has a not-null constraint on this MI_PRINX 
attribute, which QGIS is detecting. That's what the orange x represents -- the 
attribute value isn't valid for the layer.

Nyall

***
The information in this message is privileged and confidential, intended only 
for the use of the individual or entity named above. If you are not the 
intended recipient you are hereby notified to delete the message and that any 
dissemination, copying or use of its content is strictly prohibited. If you 
have received this message in error please notify the Melton City Council.
***
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Index attribute no longer updated automatically

2022-02-21 Thread Nyall Dawson
On Mon, 21 Feb 2022 at 15:08, Johanna Botman  wrote:
>
> Hi,
>
>
>
> Another QGIS 3.22.3 question.
>
>
>
> I have layers that come from a MSSQL database. Those tables were loaded into 
> SQL using Easy Loader (I know, shh!) so they have the MI_PRINX attribute.
>
> In past versions of QGIS, this MI_PRINX attribute was updated automatically 
> when a new feature is saved in a layer. That has stopped in 3.22.
>
>
>
> In my settings when a new feature is created, the default behaviour of 
> Suppress attribute from pop-up after feature creation is not ticked, so a new 
> feature created does open a pop-up box. The attribute for MI_PRINX is Orange 
> and there is a small orange x on the right hand side.

Sounds like your database table has a not-null constraint on this
MI_PRINX attribute, which QGIS is detecting. That's what the orange x
represents -- the attribute value isn't valid for the layer.

Nyall
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user