I have a table Hazard related to a table Machine. Each machine can have one or more Hazards.
When editing in the Hazard form, the user can choose a Regulation number in the column Regulation.
I would like any instance of using a Regulation no in the Hazard form, when saved, to add a value to a string in the Machine table, so for example creating Hazards that had Regulations "1", "3" and "5" would create a string in the Machine table column RegCounter of "135".
How can I do this? I'm not clear what sort of Action this is and how to kick it off.
thanks for any help
James
Hi James,
If your [Regulations] column is a list :
In your Machine table, add a virtual column [Regulations] with : number(concatenate(select(Hazard[Machine],[Machine] = [_THISROW].[Machine] )))
@JamesWB wrote:
example creating Hazards that had Regulations "1", "3" and "5"
Based on above, presume that there is a [Regulation] column in the Hazards table.
@JamesWB wrote:
would create a string in the Machine table column RegCounter of "135".
Since Hazards is a related or child table, presume you have a system generated [Related Hazards] column in the parent Machine table.
So please create another VC called say [RegCounter] in the Machine table with an expression something like
SUBSTITUTE(SUBSTITUTE([Related Hazards][Regulation],",","")," ","")
Where [Regulation] is the column in the "Hazards" table.
If you wish [RegCounter] in the Machine table to be a number type column , please try
NUMBER(SUBSTITUTE(SUBSTITUTE([Related Hazards][Regulation],",","")," ",""))
Put this App Formula in your [RegCounter] field
CONCATENATE([Related Hazards][Regulation])
User | Count |
---|---|
41 | |
31 | |
29 | |
16 | |
14 |