I am trying to modify the new-entry form of a modern list in SharePoint Online by hiding or showing a field based on the value selected in a preceding field on the same form. Microsoft offers straightforward guidance on how to do this using a JSON snippet.
While they don't list a lookup column as an unsupported field type to use for this purpose, they don't provide guidance on how to use one in this way, either. And from my testing, you can't simply grab the value of a lookup field in the described way:
=if([$LookupField]=='Hourly', 'true', 'false')
If I use a choice field instead of a lookup field, this works fine. But doing some digging, in other contexts it looks like the value may be captured in a
.lookupValue property, so I tried it this way:
=if([$LookupField.lookupValue]=='Hourly', 'true', 'false')
Still no luck. Does anyone know if it is possible to use the value from a lookup field in this way? And if so, what do I need to do to make the magic happen?