Forum Discussion

NarleyBrittes's avatar
NarleyBrittes
Copper Contributor
Mar 19, 2021
Solved

Confirgure list form with JSON

Hi there,

I'm having some trouble in conditionally displaying a text depending on if it's a new form or edit form.

The following piece of JSON (when on New form type)

* JSON for Header *
{
  "elmType": "div",
  "txtContent": "=if([$Title] == '', 'Create new item' ,[$Title])"
}

returns the message:

"Failure: Title was not found on the data object"

 

Is there a way to have this sort of condition? Or is there a better way of doing it? 

I know with Power Apps will achieve that but I can't use Power Apps.

 

Thanks!
 

  • Ok, I found the issue.

    I have 

    { "debugMode": true }

    set.

     

    Oh dear me.

    By removing it, fix the problem. 

3 Replies

  • NarleyBrittes's avatar
    NarleyBrittes
    Copper Contributor

    Ok, I found the issue.

    I have 

    { "debugMode": true }

    set.

     

    Oh dear me.

    By removing it, fix the problem. 

    • MbethC's avatar
      MbethC
      Copper Contributor

      NarleyBrittes  Hi there. I am having the same issue but not sure what you did exactly to resolve it. So can you remember how to managed to get [$Title] to be recognised as a data object? Please share and I would be so grateful 🙂

      • NarleyBrittes's avatar
        NarleyBrittes
        Copper Contributor

        Hi MbethC. In my case I had { "debugMode": true } in my JSON enabled. I just removed that bit and it was all good after that.

Resources