- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
I can only shed some light:
1:
I don't work with SAP, so can't say for sure how LC Designer and SAP generate code. However when LC Designer auto generates code, it is very clear:
//+ GENERATED - DO NOT EDIT (ID:BFBD1BE2-3120-4E46-8D35-10427D9669D4 CRC:1423498673)
//+ Type: Action
//+ Result1: SetFieldValue("$Node2","tovalue","1")
//+ Node2: form1[0].#subform[0].CheckBox1[0]
//+ Node1: form1[0].#subform[0].Button1[0]
//+ Condition1: Button("$Node1","click")
//+ ActionName: Button1.click
this.resolveNode("CheckBox1").rawValue = "1";
//-
To me the code looks like it was written by the forms developer.
2:
Again not sure, but LC Designer places a specific line and gives the code block a code.
3:
The code is a bit confusing, in that it uses "Street" in three different contexts: (1) it is the name of an object; (2) it is the name of a variable; and (3) it is used in the error message string. Basically what it is doing is if the Street object has a value, set the Street variable to "" so that it does not appear in the error message. Otherwise build it into the error message string. It works, but maybe could be made clearer.
4.
It is basically giving the user potentially one chance to click the button. If there is a problem with the data, then an error message is displayed and the user is prompted to complete the form. If all of the fields are filled in, then there is no error message and the button disappears. Probably not the most user friendly, as the user may not expect the button to disappear. Also the user could go back and delete data in Name, Street, etc.
5.
Yes, green text in the code are comments. The // indicates the start of an inline comment.
Hope that helps,
Niall