Hi all!
There is a question I could not find answer to for more than some days
Appreciate your hints or directions very much!
Imagine an example (my real situation is too difficult to describe).
I have a parent module, for example “Country”, each record has some fields: currency, name, comments, report details etc.
There is a module “Services for a country”, describing details of one service we can do, including prices per unit, price per hour, and like that.
For each country there is a subpanel containing list of services for this country.
So far everything is fine: subpanel has columns “service name, service price, details”
UNFORTUNATELY, for some countries the general “price approach” is not OK.
For example, I have a country on the planet VENUS (I have a field in Country module saying that), and for this country I do not have price per unit, price per hour.
For this country I have just a textual description of some price: for VENUS the price is “200 kg of butter per year” and for another (say, JUPITER): “Price depends on GDP of Jupiterian economics, calculated on following formula …”.
(Please don’t laugh, I am serious).
MY PROBLEM:
For regular countries in subpanel “Services” I have to display regular columns of prices etc, with fixed width, as it is a number.
For irregular countries in that subpanel I have to HIDE regular columns and display the irregular price description.
(all these fields are created and defined for module “Services for country”, of course)
How can I hide/display particular columns in a subpanel based on a value in “parent” module?
I know about Widgets to be specified in file \custom\modules<child module>\metadata\subpanels, and the Widget has to be created.
The issue here is that the widget does NOT hide column: it just puts emptiness. The space for this column is still occupied.
Is there a way to remove a column from subpanel view during runtime, and to display another one?
Thanks in advance.
(Please dont tell Musk about Jupiter)