Hello All,
I have a method that uses ApplySQL which works just fine for the user that have administrative privileges. However, for non-admin users the method does not work and error out. Learned that this is because of the function ApplySQL, so trying to find alternatives for this function call which could be ApplyAML().
Need some help changing the below sql query that is being passed to ApplySQL to convert into AML so it can be passed to ApplyAML.
ApplySQL():
1) var sql = "select a from [b] where c = '{d}'";
2) var res = document.thisItem.getInnovator().applySQL(sql.replace("{d}", variable));
I came up with this code for ApplyAML() which does not work.
ApplyAML():
1) var doc = innovator.newItem();
2) doc.loadAML("<Item type='b' action='get' select='a'>" +
"<c condition='like'>'%{d}%'</c>" + "</Item>");
3) var res = doc.apply();
The method is a client-side java script.
Thanks