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
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
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!
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
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
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.
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.
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:
- 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.
- Your account id: email@example.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.
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