What’s up, Gurus.
Is there a way to use a variable as a field key for a collection?
Here’s my code snippet:
function pageContent() {
$w("#dataGAM").onReady( () => {
$w("#dataGAM").getItems(0, 3)
.then( (result) => {
let items = result.items;
$w("#richCon1").value = items[2].pg1A;
$w("#richCon2").value = items[2].pg1B;
});
});
}
In this snippet, my field keys are “.pg1A” and “.pg1B”.
If a field key can be a variable, there’s a lot of fun stuff I can do. Just not sure if a field key can be a variable.
Let me know. And, if yes, may I have an example?