You are viewing limited content. For full access, please sign in.

Question

Question

Extra Space removed from Token

asked on March 11, 2016 Show version history

So I have an odd issue and I am not quite sure how it is working. 

We have a Form field that is a dropdown.  It is a big list of full vendor names that the user picks.  When they submit the form, we have a workflow and one of the steps is a Query Data by the Vendor Name to get the Vendor ID.  I know we obviously want to lookup by ID instead of name but the users will not know the ID.  They just want to pick the Name.  However the Query is failing on a value (not finding the vendor).  I found out why but do not understand.

The Vendor is being picked from a list.  The list is a Lookup to a SQL table.  We are doing the Query Data to the SAME table.  So we are referencing the same list that the user is picking.

Here is the vendor in question:

In SQL, copying the vendor shows the following:

20 20 OPTICAL INC - 615 MILL ST S  #2 FERGUS FALLS MN 56537

Note there are 2 spaces between S and #2.  However when workflow pulls the information from the Form we get this:

This is from the Track Tokens.  Copying this shows:

20 20 OPTICAL INC - 615 MILL ST S #2 FERGUS FALLS MN 56537

Note that there is only 1 space between S and #2 so the Query failes because Laserfiche is passing it with one space and SQL holds the value with 2 spaces.

Any idea as to why Workflow seems to remove the extra space?  Again the value is being picked from a list on the Form so it is not being keyed in.

Thanks,

Chris

 

 

0 0

Replies

replied on March 13, 2016

Are all the Vendor names unique?  If so, could you just put the Vendor ID as a drop down below the Vendor name field and use a lookup on it?  When Vendor Name matches vendor fill VendorID with IVendorid.  In theory if all vendor names are unique the vendor ID drop down should only have 1 value.  You could hidden the field so the customer never sees it or made it read-only.  In the workflow you would not need to do the query since you would have it in the retrieve form content.

0 0
replied on March 14, 2016

Yes, that is correct and one of our options.  We were tasked with finding out why Laserfiche seems to removing the space it seems in case it comes up again in other lookups.

0 0
replied on March 14, 2016 Show version history

I can't reproduce it. Workflow does not do any processing on the values. Can you check the cf_bp_data table in the Forms database and see if you have the extra space there or not? Or add it to a single line field in the form to check whether the extra space is present before the field is submitted?

0 0
replied on March 14, 2016

Thanks Miruna.  Checking the table I see the following:

Seems that it is submitted with only one space.  However in the view we are pulling from to put the value in the Form we have:

This does seem to have two spaces.  Copying both directly from the table:

Vendorlist:   20 20 OPTICAL INC - 615 MILL ST S  #2 FERGUS FALLS MN 56537

cf_bp_data:  20 20 OPTICAL INC - 615 MILL ST S #2 FERGUS FALLS MN 56537

0 0
replied on March 14, 2016

OK, so that makes it a Forms problem, not a Workflow problem wink

But I can't reproduce it in Forms. I create a table with a value with 2 spaces in between 2 words, hooked it up to a data source and it still has the 2 spaces when the form is submitted. Is the data source using a stored procedure or are you running javascript on the page that might be responsible for cleaning up values?

0 0
replied on March 15, 2016

The Form field is just a Forms lookup field to a table.  The rule has no condition as we want the dropdown field to contain all the vendors.  

The only java we are using is to hide a table and the comments section:

#q43 li, #q43 table, #q43 .cf-section-header, .approval-wrap p, #comments { display: none!important; border: none 0px transparent !important; }

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.