SOLVED

Confirgure list form with JSON

%3CLINGO-SUB%20id%3D%22lingo-sub-2222026%22%20slang%3D%22en-US%22%3EConfirgure%20list%20form%20with%20JSON%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2222026%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3EI'm%20having%20some%20trouble%20in%20conditionally%20displaying%20a%20text%20depending%20on%20if%20it's%20a%20new%20form%20or%20edit%20form.%3C%2FP%3E%3CP%3EThe%20following%20piece%20of%20JSON%20(when%20on%20New%20form%20type)%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E*%20JSON%20for%20Header%20*%0A%7B%0A%20%20%22elmType%22%3A%20%22div%22%2C%0A%20%20%22txtContent%22%3A%20%22%3Dif(%5B%24Title%5D%20%3D%3D%20''%2C%20'Create%20new%20item'%20%2C%5B%24Title%5D)%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ereturns%20the%20message%3A%3C%2FP%3E%3CP%3E%22Failure%3A%20Title%20was%20not%20found%20on%20the%20data%20object%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20have%20this%20sort%20of%20condition%3F%20Or%20is%20there%20a%20better%20way%20of%20doing%20it%3F%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20with%20Power%20Apps%20will%20achieve%20that%20but%20I%20can't%20use%20Power%20Apps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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!
 

1 Reply
best response confirmed by NarleyBrittes (New Contributor)
Solution

Ok, I found the issue.

I have 

{ "debugMode": true }

set.

 

Oh dear me.

By removing it, fix the problem.