if ‘Yes / No’ then (select Clients)[Sex = 1] else select Clients end This way I would get different values in the field. Or I could have a different order for my results: if ‘Yes / No’ then select Clients order by ‘Last Name’ else select Clients order by ‘First Name’ end
With a little trick actually we can change the value being displayed in the DCF/DMCF as well. We can set a switch (Yes/No field – can be hidden) on the Clients table as well. When we flip the Yes/No switch on our main table that would set all record value as well to the same. Now we can build the condition what field to display. In the Dynamic Value Name we can write a code. As example we will display First name if it’s on else display the last name:
if ‘Yes / No’ then ‘First Name’ else ‘Last Name’ end
So now we know how to filter records, organize them by different order or show different values. Of course, we can combine these 3 example codes above.
Setting values for DCF/DMCF:
Now we are able to set values by code as well to these fields. For DMCF we can either use the
‘Multiple choice (dynamic)’ := select Clients
(this would select all) or we can use filters on this as well
‘Multiple choice (dynamic)’ := select Clients[‘Yes / No’ = 1]
Also we can just simply assign an array of IDs to it
‘Multiple choice (dynamic)’ := [1,2,3]
For DCF it would be easier by just assigning a simple record
‘Choice (dynamic)’ := first(select Client)
Or assigning a number value
‘Choice (dynamic)’ := 1
With these features you can make your database very versatile.