YES/NO use like to show / hide table element
There is a table where YES/NO we use how to hide show fields for currency exchange rates. This currency rate is displayed in other tables as well. When we disabled in the main table, it does not disable in other tables. For this we now use "choise" field with formua
let c := format(Date, "DD.MM.YY");
(select GM)[format(DATE, "DD.MM.YY") = c].VISA = 1
But it doesn't work for for YES/NO field
let c := format(Date, "DD.MM.YY");
(select GM)[format(DATE, "DD.MM.YY") = c]. YES/NO = True
Tell uswhat the problem is
Regards Mamuka
10 replies
-
Hi Mamuka
If your code is in the Display field only, if: section
1. You don't need to format the dates in you code
2. Your field is probably called 'Yes / No'
3. The 'Yes / No' field returns 1 for Yes, not TRUE
4 'Yes / No' = 1 is the same as 'Yes / No'
So your code becomes
let c := Date;
(select GM)[DATE = c].'Yes / No'Do you have a relationship between the tables? If so this can be simplified further.
Regards John
-
Hello John
GM is a basic table where information from all tables comes. It is here that the "show hide" button is located and it is called "YES/NO 12"
-
i tried it doesn't work
Regards Mamuka
-
Can you send me a screenshot of the code. If you can als send a screenshot of the two tables concerned that would help too, plus the Data model (how they are joined together)
Thanks John
-
The select statement returns an array of boolean values, and not a single booelan value as you expect. So you must reduce the array to a single value. How to do it depends on what kind of data is actually contained in the tables. The formula below will return a true result if the "Yes / No" field has the value "Yes" in at least one of the records of the "GM" table where the date has the required value.
let c := Date;
max((select GM)[Date = c].'Yes / No')
-
Thanks Alain
everything works correctly)
-
Hello Alain, sorry, but again doesn't work, it doesn't turn off the field in other tables
-
John
Code when i use "YES/NO" in table "GM"
Next table name is "CASH DECK" and joined with mine table ( "GM" )like this
for terned field with "YES/NO" im usung cod
-
Sorry wrog Pic, this pic is correct
-
Hi Mamuka
As with Alain's solution, you need to move this away from an array to a boolean result, so include the max function
max((select GM)[DATE = c].'Yes / No 2')
Regards John
Content aside
- 3 yrs agoLast active
- 10Replies
- 731Views