The method getListdata() works perfect.... almost for me And my Javascript skills are letting me down
I want to grab the field value of 1 row in a list and store it in a JSONFORM
But I don't want to define the JSONFORM as a detailview of that list, nor do I want to have any databinding on the JSONFORM
I get as result from a list (row):
If I use the code above with setValue(JSONFORM), the field of the form are filled, but the form becomes uneditable.
How do I remove in Javascript: the brackets [ ]
and preferably also the last two data pair- inclusive comma: ,"__primaryKey":"326","__selected":true
So I need as result a javascript variable containing:
If I feed this code to the jsonform with SetValue, everything works as a charm.
Thanks
I want to grab the field value of 1 row in a list and store it in a JSONFORM
But I don't want to define the JSONFORM as a detailview of that list, nor do I want to have any databinding on the JSONFORM
I get as result from a list (row):
Code:
[{"Kontpers_volg_nummer":"326","Relaties_nummer":"40","Kontpers_default":"","Kontpers_achternaam":"nummertje 5","Kontpers_voorletters":"","Kontpers_tussenvoegsel":"","Kontpers_geslacht":"V","Titu_kod_titulatuur":"Mevrouw","Aans_kod_aanspreking":"Geachte mevrouw","Kontpers_roepnaam":"Lena","Kontpers_opmerkingen":"Dit is het memoveld en de memo opmerkingen","Kontpers_tweede":"","Kontpers_funktie":"directrice","KontpersArchief":"","KontpersAchterVoegsel":"","KontpersGeboorteDatum":"","KontpersIdentieteitsbewij":"88888888","Kontpers_niet_in_bericht":"","__primaryKey":"326","__selected":true}]
How do I remove in Javascript: the brackets [ ]
and preferably also the last two data pair- inclusive comma: ,"__primaryKey":"326","__selected":true
So I need as result a javascript variable containing:
Code:
{"Kontpers_volg_nummer":"326","Relaties_nummer":"40","Kontpers_default":"","Kontpers_achternaam":"nummertje 5","Kontpers_voorletters":"","Kontpers_tussenvoegsel":"","Kontpers_geslacht":"V","Titu_kod_titulatuur":"Mevrouw","Aans_kod_aanspreking":"Geachte mevrouw","Kontpers_roepnaam":"Lena","Kontpers_opmerkingen":"Dit is het memoveld en de memo opmerkingen","Kontpers_tweede":"","Kontpers_funktie":"directrice","KontpersArchief":"","KontpersAchterVoegsel":"","KontpersGeboorteDatum":"","KontpersIdentieteitsbewij":"88888888","Kontpers_niet_in_bericht":""}
Thanks
Comment