Sp-dev-docs: Not display modal view on click custom-formatting-lookup column.

Created on 25 Mar 2019  Â·  5Comments  Â·  Source: SharePoint/sp-dev-docs

I customize my lookup column with JSON formatting. But when clicked on item in this column there's problem with display modal view (probably the class of the modal view is "od-IFrameDialog") and this view not support on the custom formatting lookup column.

image

After click 758 number, nothing happens.
But after click on 2 565, whitch is the same type of column as Obj. dopravce, it show this window.
image

Have anybody idea how to solve this? Thanks


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

list-formatting answered question

Most helpful comment

Unfortunately, I do not believe what you are trying to do is supported by Column Formatting. @thechriskent can probably confirm, but the click events that are registered would not be picked up by the customization.

An option, could be to provide a link to the item in a new window, by constructing a URL to the lookup list. Not the same experience, but another way around it.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "debugMode": true,
  "elmType": "a",
  "txtContent": "@currentField.lookupValue",
  "attributes":{
  "href":"=@currentWeb + '/Lists/YourLookupList/DispForm.aspx?ID=' + @currentField.lookupId",
  "target":"_blank"
  }
}

All 5 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@thechriskent @bcameron1231

Unfortunately, I do not believe what you are trying to do is supported by Column Formatting. @thechriskent can probably confirm, but the click events that are registered would not be picked up by the customization.

An option, could be to provide a link to the item in a new window, by constructing a URL to the lookup list. Not the same experience, but another way around it.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "debugMode": true,
  "elmType": "a",
  "txtContent": "@currentField.lookupValue",
  "attributes":{
  "href":"=@currentWeb + '/Lists/YourLookupList/DispForm.aspx?ID=' + @currentField.lookupId",
  "target":"_blank"
  }
}

Yes, then I solved it with link to the item in new window. Thanks for help.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings