Custom List Inline Editing - Cannot CLEAR Number Field

Michael Ray 21 Reputation points
2024-07-29T18:24:42.73+00:00

Hi all: I am building a SharePoint Online custom list using JSON to enable inline editing for all for all of the columns. It is working out pretty well (particularly with the "select" fields.... However, I have a couple of KEY number fields that are causing massive grief.

While the fields can be edited, for some reason, they can NOT be cleared out, completely. In other words... If a user begins to enter a number (these filelds accept only 0-1 as values, so two decimal places are allowed) and realizes that the first number is wrong, she/he can NOT clear the field and start over. The only way to change the first number entered is to add additional numbers and then use arrow keys back to delete the first number. In other words, the field must ALWAYS have at least one number... and I have not set any sort of requirement that would cause this scenario. Any help would be appreciated.

Here is the code for one of the annoying columns....

Image

Thanks.

EDIT: I have tried stripping this code down to the bare minimum

{

"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",

"elmType": "div",

"inlineEditField": "@currentField",

"txtContent": "@currentField"

}

... with the same result.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,044 questions
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 26,766 Reputation points Microsoft Vendor
    2024-07-31T02:02:04.59+00:00

    Hi @Michael Ray ,

    Got you! There are also two ways you can try:

    1. Select the item you want to edit, click Edit in the command bar, and in the panel that opens, you can edit the value in the column you want to edit.

    User's image

    1. Directly click the value in the column, which will result in the value not being completely deleted, and a value will always be retained. You can move the cursor forward and enter the value you want to enter, so that you can delete the previous value and complete the replacement.

    Have a nice day! :-)


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


3 additional answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 26,766 Reputation points Microsoft Vendor
    2024-07-30T08:00:09.23+00:00

    Hi @Michael Ray ,

    This is by design and this cannot be made via JSON.

    If you want to clear a single value, you can do so by editing a single item.

    To clear multiple values, clear a single value first, then clear them in bulk by dragging the small squares.

    07301

    For your reference:

    https://sharepoint.stackexchange.com/questions/292845/how-do-we-vertically-delete-values-from-a-single-column


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Michael Ray 21 Reputation points
    2024-07-30T15:26:52.4766667+00:00

    Perhaps I did not explain the issue clearly... I am trying to edit a single column in a single record and simply trying to delete the contents so I can enter a new value (please see screenshot).

    inlineEditingIssue <Delete>, <backspace>, <shift><backspace><delete>... nothing works to clear out the field. Any thoughts or suggestions would be greatly appreciated.

    0 comments No comments

  3. Michael Ray 21 Reputation points
    2024-08-05T15:02:25.3833333+00:00

    Thank you - Yes, I have noted that the only way I have found to properly edit these fields is to double-click and open the form for editing as using inline editing will not allow me to clear the field out completely. I have decided to leverage the form for editing these problematic fields - even though it is not the desired solution.

    Thanks for your help.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.