Format Expression Editor not working? I am fi...

Format Expression Editor not working? I am fighting with trying to get an expression to work for what I want it to do with formatting and found that when I just put in a word, the expression editor shows pass with green check. When I save the change, I get an error message that The filter condition โ€˜=โ€œRelated Doorsโ€โ€™ of format rule โ€˜New Format Rule 2โ€™ must return true or false. I attached some screen shots

0 14 421
14 REPLIES 14

#ERROR!

@Jason_Spicer

Your current expression returns the string value โ€œRelated Doorsโ€. The error message is correct because that expression does not return either a true or false value.

What are you trying to do?

@Philip_Garrett_Appsh Sorry, in google sheets it is property and in the app it is Rehabs I donโ€™t understand why Appsheet takes the name of the workbook and calls the first sheet the workbook name and not use its sheet name

@Jason_Spicer

Try this expression:

COUNT(SELECT([Related Doors][Door ID], NOT([All Materials Ordered]))) > 0

I would put it in a temporary virtual column in table โ€œRehabsโ€ and test it to make sure it works before putting it in the Format.

The table naming approach is a heuristic.

Often if a workbook has only one worksheet, the user will assign the meaningful name to the workbook rather than to the single worksheet.

If the workbook has two or more worksheets, the user will normally assign a meaningful name to each worksheet.

@Philip_Garrett_Appsh That worked!!!

Thank you for taking the time to look at it and provide me with a great solution. This will make my app progress even further to completion.

Thank you and have a great night!

@Jason_Spicer

You are welcome. Your app looks well designed.

I understand that but why does the expression editor show that the expression is fine?

I put just the word cat in the expression editor and it show a green check. I donโ€™t have the word cat anywhere in my app or data

@Jason_Spicer

The green check mark indicates that the syntax is correct. Instead of โ€œCatโ€, try writing (Cat or "Cat you will see that it will alert you. That does not mean that the expression will yield to a boolean result

@Jason_Spicer

When the Editor invokes the expression editor it passes it a list of acceptable โ€œtypesโ€. If the expression you enter matches one of those โ€œtypesโ€ you see the green checkmark in the expression editor.

I am guessing that there is a bug in the Editor and that it is passing in โ€œstringโ€ as an acceptable type. We should only be passing in โ€œtypeโ€ Boolean". Both of the values you entered are of โ€œtypeโ€ string.

Different code is checking the expression again when the AppTemplate is saved. It appears to be doing the โ€œtypeโ€ checking correctly. It is reporting that the expression is not of โ€œtypeโ€ boolean.

I am the server guy, not the Editor guy, so I am only speculating, but it is informed speculation.

Thanks for reporting the bug.

In the interim, if you want the Format rule to work, you need to enter a boolean expression. Do you need help with that?

OK, that is a little confusing. I am trying to get an expression to check for a value in a column of a related table.

I had another post that Praveen said it can be done, but wasnโ€™t sure how to format it.

First Post:

Actions, Workflows, and Formatting that traverse tables.

It would be helpful to have actions, workflows, and formatting that traverse tables.

I have an app with a property table and have other tables such as doors, windows, etc, that are referenced back to the property. I created actions at the top of the property details view that will bring me to a related inline view of the tables.

In the tables, I have a column for โ€œAll Materials Ordered?โ€ and have done formatting to change the door id to red if that column is false. It would be great if I can make the action icon in the property detail view of the property turn red to match so that when you look at the property, you can tell that the materials are not all ordered for the doors or whatever table that has that formatting.

Thanks Jason

Praveen Seshadri [AppSheet] Owner Hi Jason, you can do this via richer expressions in the formatting rule. For example, a formatting rule on the property could check not just the columns of the property but also the โ€œrelated doorsโ€ and see if any of them has โ€œAll Materials Ordered?โ€ = false. We canโ€™t just roll this up automatically because we donโ€™t know what logic you might want.

Jason Spicer @praveen Praveen, how to do you write the expression for that as I get the error message that you cannot compare list with text?

I can help with the expression if you can tell me:

  1. Your account id 2. Your app name 3. The table names involved. It sounds like there are at least two of them. 4. The name of the table and the name of the field in that table you want to format. 5. The name of the table and the name of the field in that table you want to check. It sounds like the name of the field might be "โ€œAll Materials Ordered?โ€ Can you confirm that and provide the table name? 6. Can you restate how you want the format rule to work.

@Philip_Garrett_Appsh Here you go. Sorry, my app is pretty big and in depth, but if I can get this figured out, I can get to cleaning it up and making it complete.

  1. Your account id: jspicer76@gmail.com 2. Your app name: Rehabs-192204 3. The table names involved. It sounds like there are at least two of them. : Property & Doors 4. The name of the table and the name of the field in that table you want to format. : Property, format the Doors Action button 5. The name of the table and the name of the field in that table you want to check. It sounds like the name of the field might be "โ€œAll Materials Ordered?โ€ Can you confirm that and provide the table name?: Table is Doors and the field is All Materials Ordered 6. Can you restate how you want the format rule to work. : If the โ€œAll Materials Orderedโ€ field is FALSE, then I want the Doors Action button in the Property Detail view to show as Red, and if true, then normal color.

@Jason_Spicer

I am looking at app appsheet.com - Sample mobile apps for common scenarios

I see table โ€œDoorsโ€ and itโ€™s field โ€œAll Materials Ordered?โ€.

I do not see a table called โ€œPropertyโ€ in that app.

Am I looking at the right app? Sample mobile apps for common scenarios appsheet.com

Top Labels in this Space