Is there an easy solution to be able to extract the raw data from the json file on a screen and modify the text?
For example, we have a subfile that has mulitple rows, but only one column. We are wanting to set the detect subfile to false for the screen and then take the json file and parse out the data in the element in order to create multiple new fields, and overlay a grid in those fields. This would essentially make it to where we could make a one column subfile render as a multi column subfile.
In the json file I attached, as an example, we are wanting to get the info at
{
"type": "O",
"row": 6,
"col": 4,
"attr": "20",
"data": "OU40160335 TEST COMPANY LL TEST COMPANY L.L.C. 03/19/2017 CMP Renew",
"size": 76
},
and take this data portion, and parse the data out to where the OU40160335 would be in the first column, and TEST COMPANY LL would be in another, and TEST COMPANY L.L.C. would be in another, and the date, and then CMP and then Renew all in their own columns.
json files
-
- Profound User
- Posts: 48
- Joined: Wed Apr 12, 2017 4:44 pm
- First Name: Darin
- Last Name: McCammon
- Company Name: NAICO
- Phone: 4052584301
- Address 1: 1010 Manvel Ave
- City: Chandler
- State / Province: Oklahoma
- Zip / Postal Code: 74834
- Country: United States
- Contact:
json files
- Attachments
-
- json.txt
- (13.76 KiB) Downloaded 667 times
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: json files
Why not retrieve the data from the screen?
I can't think of any easy way to get the json data, at least, not without modifying Genie. But, all it does with this data is create fields on the screen, which you can very easily retrieve. So why not just use them?
I can't think of any easy way to get the json data, at least, not without modifying Genie. But, all it does with this data is create fields on the screen, which you can very easily retrieve. So why not just use them?
-
- Profound User
- Posts: 48
- Joined: Wed Apr 12, 2017 4:44 pm
- First Name: Darin
- Last Name: McCammon
- Company Name: NAICO
- Phone: 4052584301
- Address 1: 1010 Manvel Ave
- City: Chandler
- State / Province: Oklahoma
- Zip / Postal Code: 74834
- Country: United States
- Contact:
Re: json files
Because Genie is putting the whole string into one element. We want the data in the element to be separated out into multiple different elements so that we can spread them apart and resize the columns, but when the element is only one column so to speak, you cannot do this without using the letter spacing or word spacing which does not align very well.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: json files
Reading it from the JSON file will also return it as all one element.
My question is why you cannot read it from the screen instead of the JSON file. If you write code to substring it and put it somewhere else you can do that just as easily after reading it from the screen as you could if you read it from a JSON document. But, reading it from the screen can be done right now without changing how Genie works, whereas reading it from a JSON file cannot.
My question is why you cannot read it from the screen instead of the JSON file. If you write code to substring it and put it somewhere else you can do that just as easily after reading it from the screen as you could if you read it from a JSON document. But, reading it from the screen can be done right now without changing how Genie works, whereas reading it from a JSON file cannot.
-
- Profound User
- Posts: 48
- Joined: Wed Apr 12, 2017 4:44 pm
- First Name: Darin
- Last Name: McCammon
- Company Name: NAICO
- Phone: 4052584301
- Address 1: 1010 Manvel Ave
- City: Chandler
- State / Province: Oklahoma
- Zip / Postal Code: 74834
- Country: United States
- Contact:
Re: json files
Yes, I know that the JSON file will return it all as one element, but it would render the blank spaces differently, because the json file does not include the &NSBP; for a space, whereas it does for the innerHTML using javascript on the onload option.
Who is online
Users browsing this forum: No registered users and 2 guests