TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
How about a Formula-JSON column type?
We already have a Formula-XHTML. It shouldn't be too far-fetched to have a Formula-JSON.

Speaking from my own experience, I now have several databases, each for an aspect of the company's work. I am working to add data exchanges between the databases, and Call URL increasingly come into use. Normally I would construct the JSON data in the Call URL body. To edit the JSON data, I need to go to "Rules-actions" to make the change. If we have a Formula-JSON type, I can maintain the data in a single formula-JSON column, and in the Call URL body, I use just a single <%...%>. That would save a lot of edit actions.
ID
1537
Category
Customization
Author

SDM IT
Date Created
7/9/2022 9:11:05 PM
Date Updated
7/11/2022 7:21:04 AM
Status
New Idea
Score
10
Promoted By
SDM IT
Comments
SDM IT 7/9/2022 9:24:08 PM
Pardon me. After posting the idea I tested Formula-XHTML and find I can enter JSON data into it. So I withdraw the above suggestion.
SDM IT 7/9/2022 9:24:09 PM
Pardon me. After posting the idea I tested Formula-XHTML and find I can enter JSON data into it. So I withdraw the above suggestion.
Pierre 7/10/2022 2:20:55 AM
Hello SDM

I would just like to make sure you are aware of the existence of the JSONEncode() and XMLEncode() functions - which I discovered recently
https://www.teamdesk.net/help/11.4.12.aspx

Pierre
SDM IT 7/10/2022 6:13:33 AM
Hi Pierre,

Thanks for the pointer! I did come across this writing and have used the passthrough blocks in Call URL. What I was hoping is that I can put the whole JSON data construction into a formula-JSON column, and then in the Call URL body uses just a single <%...%>. That way when we edit the content we don't have to go to edit the action which requires to and flo from columns to actions. But after I posted the suggestion, I found that the formula-XHTML can take JSON data like this:

{
"D/T Connect": "<%Format(Now(),'yyyy-MM-ddThh:mm:ss')%>",
"Id": "<%[Id]%>",
"Name": "<%=[Nama]%>",
"Mobile Tel": "<%=[Mobile Tel#]%>",
"Foto URL": "<%=[Foto URL]%>"
}

The result JSON text is correct like this:

{ "D/T Connect": "2022-07-10T06:02:10", "Id": "4", "Name": "Ilfan Nugroho", "Mobile Tel": "+6281281581158", "Foto URL": "https://sudamanik.teamdesk.net/secure/db/99999/image.aspx?fid=36349703" }

But the formula looks a bit unsightly:

'{\n\t"D/T Connect": "'&XHtml(Format(Now(),'yyyy-MM-ddThh:mm:ss'))&'",\n\t"Id": "'&XHtml([Id])&'",\n\t"Name": "'&XHtml(Nz(ToText([Nama])))&'",\n "Mobile Tel": "'&XHtml(Nz(ToText([Mobile Tel#])))&'",\n "Foto URL": "'&XHtml(Nz(ToText([Foto URL])))&'"\n}'

I think if TD can drop the XHTML (meaningless here) it would be perfect.

By the way, I have tried a few more no-code tools and am trying FlutterFlow now.
Pierre 7/10/2022 8:43:25 AM
Hello SDM (in Sudamanik, Indonesia ?)

1) What is the benefit of creating the JSON in an XHTML formula instead of a normal Text formula ?
Are you using it in a Call action or displaying it in a form view ?

2) When you display an XTHM Formula in "view mode", Teamdesk adds a 'XHtml'. When you display in Edit mode, the Xhtml is not present. I do not know why.

3) Flutterflow: seems nice ! Is it the good one ?

Pierre
SDM IT 7/10/2022 9:23:00 AM
1) Benefit of writing JSON in Formula-XHTML? Just the ease to write multi-line content. With Formula-Text I need to use "List('\n',..." to separate the lines each being a key-value pair.

2) Yes XHTML is added by the formula editor, but the resulting text is clean.

3) FlutterFlow. It is quite powerful since it allows the writing of code to make custom functions and actions. But I find that the preview part is very slow, each time taking several minutes as the app is recompiled at server. This slows down work quite a bit. I am now testing Draftbit also. Sorry if I am feeding you useless information as I am still testing them.

Pierre 7/11/2022 7:21:04 AM
"Sorry if I am feeding you useless information as I am still testing them."
Your feedback on Low Code mobile apps is very useful as it is ! thanks a lot for this
Pierre
Feedback
 
Back to Search Results