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

Question

Question

Forms - Save to Repository task - Bad Field Value

asked on June 8, 2022

Hello,

I have a form with a table, and I'd like to have each row from the table populate a multi-value field group on the 'save to repository' service task; so if there's 2 rows in the table, there would be 2 sets of that field group. 

I am getting a 'bad field value' error on each of the fields in the multi value field group when the 'save to repository' service task tries to run. The template fields are all text, and the character length is more than enough. I've stared at this for a while now and can't figure out what the issue is. LFS version 10.4.3.115 and Forms version 10.3.1.635.

 

You'll notice that I'm putting two columns into the Amount field - one of those columns will always be blank for any given row. I've done this plenty of times before in similar situations and it's always worked fine - the blank value is blank on the template. If I remove one of those columns from the field mapping, I still get the same error. Wanted to include this because it is a little weird.

0 0

Replies

replied on June 8, 2022

Can you share the full text of the error you are getting?  A lot of times that error message has enough information to determine which field(s) is/are causing the error.

0 0
replied on June 8, 2022

Hi Matthew,

Full error below:

 

An error occurred during the execution of the Save to Repository service task. [LFF5426-ErrorExecuteSTR]

Details:
URL: 
Error: ErrorExecuteSTR
Date: 6/8/2022 1:56:59 PM (Central Standard Time)
HTTP Status Code: 500
Business Process ID: 1011
Instance ID: 14893
Business Process Name: Journal Entries

Other:
Bad field value ('GL Codes'): Bad field value. [9017]
Bad field value ('GL Description'): Bad field value. [9017]
Bad field value ('Amount'): Bad field value. [9017]
Bad field value ('Units'): Bad field value. [9017]
Bad field value ('Date'): Another operation on which this operation depends failed. [9054]
Bad field value ('Memo'): Another operation on which this operation depends failed. [9054]

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An error occurred during the execution of the Save to Repository service task. [LFF5426-ErrorExecuteSTR]
   at Laserfiche.Forms.Routing.SaveToLaserficheService.Execute(Int32 instanceId, IRoutingContext routingContext, RoutingInstanceStatus OriginalStatus)
   at Laserfiche.Forms.Routing.ServiceTask.Execute(Int32 instanceId, IRoutingContext routingContext)

Inner exception: Laserfiche.RepositoryAccess.MultiStatusException
Message: Multistatus response. [9039]
Bad field value. [9017]
Bad field value. [9017]
Bad field value. [9017]
Bad field value. [9017]
Bad field value. [9017]
Another operation on which this operation depends failed. [9054]
Another operation on which this operation depends failed. [9054]
   at Laserfiche.RepositoryAccess.EntryInfo.Save()
   at Laserfiche.Forms.CommonUtils.LFHelper.SetValueToTemplateField(EntryInfo lfDoc, String template, FieldValueCollection fvs)

0 0
replied on June 8, 2022

"Bad field value" on all four, that's not helpful.

I was hoping it would only be on one of them and would be more helpful like missing required information or not matching field contstraints.  It's not really clear from that what's "bad" about it...

All all four fields are configured in the repository to be multi-value and text?

0 0
replied on June 8, 2022

Yes, here's a screenshot from the admin console. I'm pretty perplexed on this one

0 0
replied on June 8, 2022

Darn.  I'm out of ideas.  Maybe someone else has an idea.

0 0
replied on June 8, 2022

Unhelpful reply here: I tried a few things and they all worked, so was unable to reproduce your error. I'm on ver 11 so it's possible that whatever issue you're encountering was fixed in 10.4 or 11. Probably worth opening a case with Support to get to the bottom of it.

0 0
replied on June 9, 2022

Are you able to see what values were trying to be set for those 4 fields?

0 0
replied on June 9, 2022

Here's a screenshot of the variables being used in a suspended task. The 'Debit' and 'Debit_1' variables are no longer used in this table, so ignore those. I've also put a screenshot of the table itself below with an example of a pair of rows that will be entered - you can see how either the debit or credit column will be blank on any given row, which is why I put both columns into the 'Amount' template field, since one will always be filled out. What I've found is that if I put both amounts into the Debit columns, the form submits fine with no errors. If I put both in the Credit column, I get the same error as I do when putting one value in each column.

 

0 0
replied on June 9, 2022

I can't tell from your screenshot, but in the repo do any of the fields have restraints configured on them?

0 0
replied on June 9, 2022

Nope, just regular ol' multi-value text fields, unfortunately.

0 0
replied on June 9, 2022

What are the field types of the Debit and Credit fields on the form?

0 0
replied on June 9, 2022 Show version history

They are both number fields. There is also javascript that takes whatever is input into the Debit field and puts a '-' in front of it, so '200' turns into '-200.' But, I've removed that Javascript and that didn't change anything, so I put it back.

We do a simple calculation on the form to make sure that the total debits and credits equal 0, so that's why those are number fields.

0 0
replied on June 10, 2022

Update on this - upgraded LFS to version 11, which did not fix anything. Upgraded Forms to version 11, update 2, and now this is working with no additional configuration.

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

Sign in to reply to this post.