Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Hi,
I've created a simple RecordType based on a MySQL table, and when editing the grid list (tab List), I have added a new column that does not exist is the underlying table (ex : "total" that is the sum of fields "nb1" and "nb2").
When using this colum in a Grid of an interface, why does the "Recordtype!Vehicles.Fields.total" is not available ?
Does the Fields object contain only the fields that exist in the underlying table ?
Discussion posts and replies are publicly visible
I think that may be so. Thankfully, you can find two very quick ways around it:
1. Recreate that table with the total row in a View designed to be read directly by Appian. It's actually a very common design pattern, well worth looking into, that you write according to tables, but you receive data from your DB exclusively in terms of Views. The "always query from Views" pattern. This allows you to get optimum database structure without having to make your tables conform to your CDTs. You can make your VIEWs conform to your CDTs.
2. Recreate the logic (as painful as it might be to repeat yourself) in Appian code. You have access to all manner of query aggregation functions including SUM that you can use in your query expression. You also have the benefit of a "total" column that you can compare against your Appian to make sure it's right. (You might want an explicit note in a comment that this rule DOES NOT read the database's "total" but makes its own.)
Thank you David.
For our customer projects, our calculated fields are effectively always added in a new MySql view.
But my question, was just an example of adding a new column in a RecordType. That's all ;-)
So I just need to know : the "RecordField.fields" object can only displays the fields that is in the DB table (or DB view)? not all the columns ?