Skip to content

Commit

Permalink
fixed id handling
Browse files Browse the repository at this point in the history
MrDoe committed Feb 2, 2024
1 parent b5d40ab commit 47d78e6
Showing 2 changed files with 15 additions and 6 deletions.
Binary file modified src/backend/SCM_API.sdp
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/********************************************************************************
/*
Description.. : Save form as XML in database
Author....... : DC
Date......... : 2023-11-16
*******************************************************************************/
*/

// generate XML from form and save it to database
async function SaveForm(sApplicationName, sFormName, sFormLang)
@@ -55,10 +55,8 @@ async function GetXMLProperties(control, sIndentation = "")
control.Guid = System.Guid.NewGuid().ToString();

sXML += sIndentation + "<Guid>" + control.Guid + "</Guid>\n";

if(control.Id)
sXML += sIndentation + "<Id>" + control.Id + "</Id>\n";



// loop over control's properties
for (let row of aProperties)
{
@@ -75,6 +73,13 @@ async function GetXMLProperties(control, sIndentation = "")
if (value === undefined || value === null || value === "" || value === "default")
continue;

// skip id in brackets
if(sPropertyName === "(Id)")
{
control.itemId = value;
continue;
}

if (control.xType === "TabPage" || control.xType === "Form")
{
if (sPropertyName === "Top")
@@ -98,6 +103,10 @@ async function GetXMLProperties(control, sIndentation = "")

sXML += sIndentation + "<" + sPropertyName + ">" + value + "</" + sPropertyName + ">\n";
}

// add control id
sXML += sIndentation + "<Id>" + control.Id + "</Id>\n";

return sXML;
}

0 comments on commit 47d78e6

Please sign in to comment.