Expand my Community achievements bar.

Lowercase of _key parameters in xtk.session.Write method

Avatar

Level 1

Hi All,

I would like to use xtk.session.Write method, but checking for lower case of _key parameter with lower case of source field like we can do in the Update data activity:

 

collection.appendChild(<{"mycusTable"} Status={1} StatusChangeDate={date} _key="@ID" Id={id} xtkschema={"mycusTable"} />);

 

something like this :

_key=lower("@Id")

 

But what is a proper syntax for converting _key value to lowercase?

 

 

Thank you

3 Replies

Avatar

Community Advisor

Isn't it easier to make your id variable value lowercase.

 

var id = Lower(xyz);

or xyz.toLowerCase();

or match case of the ID attribute

 

collection.appendChild(<{"mycusTable"} Status={1} StatusChangeDate={date} _key="@ID" ID={id} xtkschema={"mycusTable"} />);

 

What seems to be the issue you are having?

Avatar

Level 1

I am converting the variable to lowercase already but the main problem I am having is that this Id field is in some cases in lowercase and in some cases as upper case in the table so i want to find the record by converting the id present in the table into lower case and then compare it with the lower case of the variable and then update the record. 

Any ways to do so using the collection.appendchild?