0

When using the JSON function "inlineEditField" for a choice column I can click the entry in the list and then it dissapears. Afterwards the value is cleared.

My code is:

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "inlineEditField": "[$columnname]",
    "txtContent": "[$columnname]"
}

[$columnname] has the correct internal name.

How must the JSON be changed to have a dropdown list of the valid values?

3
  • Can you check the choice column settings once, are you using "Drop-Down Menu" option or "Radio buttons" option under Display choices using setting for choice column? Try using drop-down menu option. Let me know if it works for you! Apr 27, 2023 at 10:42
  • It's set to drop-down. I tried both options neither is working.
    – Der_Fab
    Apr 27, 2023 at 10:47
  • Are you using Edge or Chrome browser? I have seen similar issue faced by another users. I think this is bug from Microsoft end with latest Edge & SharePoint updates. Apr 27, 2023 at 11:03

4 Answers 4

1

If you are here with the [Object object] problem with inline edit fields.

Please try this for your JSON column formatting: "txtContent" : "@currentField.lookupValue"

Adding .lookupValue should help for lookup columns. The properties .title and .email can work with person inline edit fields.

0

I think this is a bug from Microsoft end with latest Edge browser & SharePoint updates.

I will suggest you to raise a support ticket with Microsoft directly and report this behavior. Follow, Get M365 support - online support

Also, instead of using internal name of your SharePoint choice column, you can use @currentField like:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "inlineEditField": "@currentField",
  "txtContent": "@currentField"
}

I did few tests from my end and it is working fine for me when I have selected Drop-Down Menu under Display choices using option in choice column settings (Using both Edge - v112.0.1722.48 and Chrome browser):

enter image description here

Similar thread: InlineFieldEdit on choice column not working anymore?

1
  • It is not working when selecting "Radio buttons" option under Display choices using setting. List of choice options open and disappears immediately for me. Apr 27, 2023 at 11:16
0

I also had this issue and I suspect that assigning a default value at the moment of the field creation causes this glitch. I created a new choice field with the default value set to 'None' and the inline editing now behaves as expected. Not sure, might just be a fluke.

1
  • That might be an issue. As the choice field only had 3 values I ended up using buttons for each option to set the values to the field. Works also.
    – Der_Fab
    Jun 22, 2023 at 16:03
0

There is an issue where if the field is not visible on your Input form, the inlineEditField will not function properly. Text field value will be erase, multi-choice fields will quickly blink and disappear, etc. To workaround to keep the field hidden on your Input form is to first add it to the input form, then add a conditional formula that will always return False like =if(1== 2, 'true', 'false')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.