How to use To String inline function?

  • 26 February 2013
  • 4 replies
  • 9 views

Badge +4

I tried to use "To String(object)" inline function but could not get the expected value.


I used the example in K2 Inline Functions document in data event.


Bascally, the destintion field is a process field. In source field, I dragged To String inline function, in the value field, I put {69,120,97,109,112,108,101}. I expected to get "Example".


But what I got is "{69,120,97,109,112,108,101}".


what is the problem?


 


Thanks,


David


 


4 replies

Userlevel 2
Badge +9

David,


Do I understand correctly that you typed "{69,120,97,109,112,108,101}" in the source field of the inline function? I would expect that to return exactly the same string as the output of the function. The general purpose of that To String inline function is to convert a field whose contents are not currently in a String datatype. For example, if I have a SharePoint column of type "Person or Group", and I want to just display the group or user, I can use To String to convert the "Person or Group" field's contents to a string.


HTH,
Gail

Badge +4

Thanks Gail.


Then do you know how to append char (0xd) and char(0xa) to the end of a string?

Userlevel 2
Badge +9

I am not sure there is a way to add a carriage return or line feed at this time. I believe a feature request may have been submitted for this.


HTH,
Gail

Badge +4

Good to know. Thanks.


I am thinking using ServerEvent to do string modification.


Can you please tell me where to find the articles/documents on K2 university to change the InfoPath datasource value throug k2 Server event?


In VSAT world, I can simply use:




MainDataSource.CreateNavigator().SelectSingleNode(



"xxxx"), NamespaceManager) to do it.


Thanks again,


David




 

Reply