0

Pushing a value to a Choice field

How do I set a value in choice field through function, I know getting a value is 

if contains('Test Cycles chosen', "NEDC") then
text("Y")
end

But now I want to reverse to do this - if 'Y" then 'Test Cycle, "NEDC"

Thanks in advance

3 replies

null
    • wynand
    • 5 yrs ago
    • Reported - view

    But the application will be in one table pushing the choice to another table like this

    fields: {
    Model: Model,
    Brand: Brand,
    'EV Volumes Name': 'EV Volumes Name',
    'EV Volumes Type': 'Car Type',
    'Fuel_Type' : 'Propulsion Type',
    'Max Power - kW  (Electric Max)' : 'Electric kW',
    'ICE Max Power - kW' : 'ICE kW',
    'Combined Output kW' : 'Combined kW',

    • Sean
    • 5 yrs ago
    • Reported - view

    Are you using a button? I used a button in the "pushing" table to modify the value of a Choice field in another table. For you it would look something like this...

     

    let t := this;

    if t.YourField = "Y" then

    (select ReceivingTable where id = n).'Test Cycle' := "NEDC"

    end

     

    You could use it in "Trigger after update" also.

    • Sean
    • 5 yrs ago
    • Reported - view

    If the receiving table is a Composition table, you won't need "where id = n"

Content aside

  • 5 yrs agoLast active
  • 3Replies
  • 1396Views