on 2023 Jun 05 11:27 AM
Hi All,
I am trying to set some data in one of the arrays using the index. If I pass the index value directly (example 0), then the data is set correctly. While if I pass the index value dynamically, as shown below, the data is not set.
In the below 2 examples, the 1st one works correctly, while the 2nd one returns "undefined"-
1. this.getView().getModel("detailView").setProperty("/PermitHdrSet/to_locklinkup/0/LockoutDetSet", tabItems);
2. this.getView().getModel("detailView").setProperty("/PermitHdrSet/to_locklinkup/n/LockoutDetSet", tabItems);
Hi,
where do you iterate to dynamically set the value n?
you could construct your property string , e.g. "/PermitHdrSet/to_locklinkup/" + n +"/LockoutDetSet" or make use of a template string `/PermitHdrSet/to_locklinkup/${n}/LockoutDetSet`
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
11 | |
10 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.