I had Forms enter a string value into a Data field. Now the data is binary. How do I retreive the field value as text again?
Question
Question
Workflow - How do I get the string value of a field of type "Data"
Replies
The data from this field type is stored in the database and converted to a binary value, which isn't typically useful in a workflow. At this point the simplest way to convert the value back to a string is through a script. It would take some tinkering, so this Stack Overflow thread may come in handy.
As a general note, the data field is a deprecated field type kept around for compatibility purposes and it's advisable in most cases to avoid using it.
Hi Caroline,
This was actually the first thing I tried. I don't think converting the binary to text again is the direct issue though. It appears to be workflow that is not properly accessing the token.
I need workflow to extract the token value in order to use it in a script to begin with.
So I use the Retrieve Field Values activity before calling the script activity.
Then I can convert:
var binary = new List<List<int>>(); binary = GetTokenValue("RetrieveFieldValues_Sig");
However the field value doesn't appear to be the proper type.
When I check the token value after the workflow runs the token appears to be empty.
Retrieve Field Values does not support data fields.
Hey Miruna,
I was helping Chad on this issue in a CFW earlier today, so I may be able to help out here by preemptively asking what I'd guess Chad is about to ask :)
SInce the Retrieve Field Values activity isn't able to capture the data stored in the "Data-type" field, is there any way to pass the information captured in the field to a script within Workflow?
I ended up custom writing code to determine the size of the data and split it into multiple hidden fields on the form. It sure would be nice to have use of the data field again though to pass image data or other large data formats in integration's without the complexity of breaking the data down and re-combining it.