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

Question

Question

Lookup Rule for fields with "Number" type in a table

asked on July 12, 2017

Good morning, 

For simplicity purposes let's say that in Forms I have a Table from the "Fields" section and within that Table I have a textbox with a "Number" Field Type. 

Then I also have another textbox outside of the Table for Totals. In the "Formula" area I have =SUM(MyTable.MyField), which sums just fine.

Then on an SQL database I have a field that is set to [decimal](18, 2).

When using Lookup Rules to bring over whatever value I have on the database, it does not bring anything.

Changing the Field Type in the Table in forms from "Number" to "Single Line" brings the values from the database, but the =SUM() stops working. 

I wanted to avoid scripting something to sum the values with JavaScript if I go the "Single Line" Field Type route. I was hoping that there could maybe be some other Filed Type that would work with the =SUM() formula out-of-the-box.

I can't change the column type in the database.

Any ideas or suggestions?

Thanks,

Raul Gonzalez

0 0

Replies

replied on July 12, 2017 Show version history

Hi Raul,

1. I can use lookup rule to fill number field in table with a decimal(18,2) column and SUM works with it (the number field has setting decimal place = 2):

So for your case, how is your lookup rule configured? Can you double check if the setting is correct?

2. Single line field variable could not be used in SUM function; only number and currency fields can be work with it.

0 0
replied on July 13, 2017 Show version history

Thanks Rui,

I have a Table with 2 columns.

In one column I have the Field Type as "Number",  and "2 decimal places" and no comma delimiter.

In another column I have Field Type as Single Line.

When using the Lookup Rule I tell it to simply fill out the Number column. It does not fill out anything. If I tell it to fill out the Single Line column it does fill it out

Back in the SQL the Column Type is [BillingHours] [decimal](18, 2). I also tried with another column that has "int" as the Column Type and that did not work either. This seems to be something with our Form not displaying anything when a Field Type is set to "Number".

Also, if I tell the Lookup Rule to fill out the Number column and also to fill out he Single Line column with something else, nothing gets filled out in any column. If I then remove the Number column from the Lookup Rule, the Single Line column fills out just fine.

We are using 10.2.1 Forms.

Any ideas?

Table.PNG
Columns.PNG
NumberColumn.PNG
LookupRule.PNG
Table.PNG (5.57 KB)
Columns.PNG (15.31 KB)
NumberColumn.PNG (15.03 KB)
LookupRule.PNG (8.99 KB)
0 0
replied on July 13, 2017 Show version history

Additionally, I get this in the Google Chrome Console:

Console.PNG
Console.PNG (34.8 KB)
0 0
replied on July 13, 2017

So it looks like there is something special with your data. Can you check event viewer and see if there is detailed error log for this LFF378-Lookupfailed error? Is there any special character in your database/table name? Does lookup filling number field work if you use a different column/table/database?

0 0
replied on July 14, 2017

Yesterday I tried creating a new table and using a new column. Tried with int, numeric and decimal, but same result. I haven't tired using a new database. Let me try that and if the issue persists I guess we can submit a support ticket.

0 0
replied on July 16, 2017

I agree, please open a support case for the issue.

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

Sign in to reply to this post.