Skip to main content

Good morning. I have an question about  input mapping in memo field. One of our libraries uses method, when it reads value in field like a collection. It means it reads all info in field like this -    field info ], our problem is that we dont know how to add d ] symbols befor and after inputted info. When one field sends info to another field, exatcly in this time e] should be added, before that another field can read this. Thank You for your help

Hi,


 


I'm afraid I only understood the part where you have a library that can only read value in this format: [value].


 


So where are you trying to add the brackets? In a smartform forms/views, in a K2 workflow, or somewhere else? It'll help if you can provide some screenshots and further elaborate what you are trying to achieve.


A simple method is to put in another control such as a text area and apply an Expression on it to put the brackets around the values from the memo field you need. 


 


https://help.k2.com/onlinehelp/k2five/userguide/5.0/default.htm#Create/Views/ControlExpressions.htm


Yes i'm trying to add it to view. here is an example (example.bmp). Object view, when button Serialize get pressed generates string - 

{"$type":"Vraa.Div.Client.Reference.ObjectType, Vraa.Div.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","Any":null,"Id":"2","MimeType":"pdf","Encoding":"xml"}

 this string must be copied to key info view in field Object []. How to copy from one view i find and create that reference with TransferData. But i dont know, how to add brackets [ ]. In KeyInfo view Object [] field, transfered string must be like this:

[{"$type":"Vraa.Div.Client.Reference.ObjectType, Vraa.Div.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","Any":null,"Id":"2","MimeType":"pdf","Encoding":"xml"}]

Also i have a similar question about transfered info changing. Some methods in library uses differend inputted strings, as example in transferred string we need to remove 

"$type":"Vraa.Div.Client.Reference.ObjectType, Vraa.Div.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

and left just  

[{"Any":null,"Id":"2","MimeType":"pdf","Encoding":"xml"}]

Thank You for your help 



Hi,


 


I have to agree with Ziqing on this. The easy way is to have another control on the form or view and use it as a placeholder for the value of the expression, see video link: http://www.screencast.com/t/NpFFNX8lnmhK



  1. On the main form. Add a Text Area control (this control can be hidden at runtime).

  2. Apply Expression to the control [{string_value}].

  3. The transfer action will use the control value from step (2).


Thank you for your help


Reply