Hii, I created a TDL Where we can Sync data in real time with a E-Commerce website using JSON But I got stuck when there is not Json Object Path in json response means if there is json object path it is working fine but if there is not It is not working
Thank You For Responding Sir, I learnt JSON From your Videos Here is an example: [{"id":1,"name":"ItemName"}] Sorry I can't share full response Due to privacy reasons But I am extremely happy that you replied to me You made my day
Sir I have see your TDL That Send What's App by controlling chrome browser through C# But We can do it by python also and using scheduler and by saving cookie So that It can saves our login info and stop asking to scan QR code again and again What are your views on this Idea?
; if there is no object you directly fetch values using their tag names, here is the sample get request using your JSON response ; [Collection:RemoteJsonData] Data Source:HTTP JSON:"http://localhost/":UTF8 [Collection:RemoteJsonExtract] Source Collection:RemoteJsonData Compute:Name:$name Compute:Id:$id
Sir It is still not Working [Collection:RemoteJsonData] Data Source:HTTP JSON:"http://dummy.restapiexample.com/api/v1/employees":UTF8 [Collection:RemoteJsonExtract] Source Collection:RemoteJsonData Compute:employee_name:$name Compute:id:$id [#Menu:GateWayOfTally] Add:Item:Employee Reportisplay:Employee Report [Report:EmployeeReport] Form:EmployeeReport Title:"Employee Report" [Form:EmployeeReport] Part:EmployeeReport [Part:EmployeeReport] Line:EmployeeHeaders,EmployeeData Repeat:EmployeeData:RemoteJsonExtract Width:100% page Height:100% page Scroll:Vertical Common Border:Yes [Line:EmployeeHeaders] Border:ThickTopBottom Space Top:0.5 Fields:EmpID,EmpName Local:Field:EmpID:Set as:"Employee Id" Local:Field:EmpName:Set as:"Employee Name" Local:Field:default:Align:Left [Line:EmployeeData] Fields:EmpID,EmpName Border:thinbottom Space Top:0.5 Local:Field:default:Align:Left Local:Field:default:Border:thinright [Field:EmpID] Set as:$id Width:20 [Field:EmpName] Set as:$name Width:30
; in the JSON there is a collection called data so you need to walk into that collection to get data ; ; also you are not using compute attribute properly ; ; compute attribute takes two values one is an identifier which is used get the value ; ; second is the actual tag name in the JSON response ; Code: [Collection:RemoteJsonData] Data Source:HTTP JSON:"http://dummy.restapiexample.com/api/v1/employees":UTF8 [Collection:RemoteJsonExtract] Source Collection:RemoteJsonData Walk :data Compute:name:$employee_name Compute:id:$id [#Menu:GateWayOfTally] Add:Item:Employee Report:Display:Employee Report [Report:EmployeeReport] Form:EmployeeReport Title:"Employee Report" [Form:EmployeeReport] Part:EmployeeReport [Part:EmployeeReport] Line:EmployeeHeaders,EmployeeData Repeat:EmployeeData:RemoteJsonExtract Width:100% page Height:100% page Scroll:Vertical Common Border:Yes [Line:EmployeeHeaders] Border:ThickTopBottom Space Top:0.5 Fields:EmpID,EmpName Local:Field:EmpID:Set as:"Employee Id" Local:Field:EmpName:Set as:"Employee Name" Local:Field:default:Align:Left [Line:EmployeeData] Fields:EmpID,EmpName Border:thinbottom Space Top:0.5 Local:Field:default:Align:Left Local:Field:default:Border:thinright [Field:EmpID] Set as:$id Width:20 [Field:EmpName] Set as:$name Width:30
The data is like this there is no collection [{"id":1,"name":"ItemName","id":2,"name":"ItemName2"}] I am just using it as a dummy data
I am attaching two files 1. Json File (Dummy Data but Same Structure) 2.TDL File Please Check it It will help me a alot I am making this code from 2 Months and Now I am too much heisitating Please help me
we can't parse JSON without having an object we can parse without object but all should be direct children's like this : Code: {"id":"123","name":"itemName"} in your response it it like this : Code: [ { "id": 25226, "name": "WHITE CASTER WHEEL FIX TYPE 25MM" } ] they are not direct children's Internally with TDL Tally will map arrays->Collection , Object->Tally Objects But in your response, it is an array of arrays So I didn't found the proper doc to parse such response Possible solutions will be: 1) Contact tally dev support maybe they can give you a solution 2) You can create a dll or executable to parse such JSON and get the result (c#,vb.net, python etc...)
Thank You For Your Guidence Sir, But I don't think Tally Developer Team will help me because I am not a professional...I am simple user of tally using it in educational mode Because I don't have enough money to purchase it Because I am only 16 Years Old So, I will go for second option
Use API Study About Tally Integration Preferred Channel -- Software Codecs Preferred Book -- Tally Integration Book Study About JSON Study About API Study About Get, Post, Put, Delete Request Study About Http/Https Study About Why Tally Sometimes Don't work with Https? Follow This Path...
I am also working on similar project for one of my customer but I am not getting how to set WooCommerce Basic Authentication details in TDL so that Order Data can be fetched. Thanks in advance.
I have made the same thing. It works pretty good. You can try it out too . It was fun developing that.