0

Trigger on a choice field

Hi to all

 

I have a button perfectly functioning on a table with this formula:

let x := dialog("Edit", "Edit Release", ["No", "Yes"]);
if x = "Yes" then
    let xCurrRec := ID;
    let xReleaseNumber := 'Release Number';
    let xArtistID := 'Artist ID';
    let xReleaseArtist := 'Release Artist';
    let xRelease := Release;

let myRecord := (select Release where 'Release Number' = xReleaseNumber);
    myRecord.('Release Number' := xReleaseNumber);
    myRecord.('Artist ID' := xArtistID);
    myRecord.('Release Artist' := xReleaseArtist);
    myRecord.(Release := xRelease);

openTable("Release", "myRecord")
end

 

I would like now to set these instructions on a trigger of a choice field called: Tools

 

I added the same formula with a new first line:

 if Tools = 3 then

let x := dialog("Edit", "Edit Release", ["No", "Yes"]);
if x = "Yes" then
    let xCurrRec := ID;
    let xReleaseNumber := 'Release Number';
    let xArtistID := 'Artist ID';
    let xReleaseArtist := 'Release Artist';
    let xRelease := Release;

let myRecord := (select Release where 'Release Number' = xReleaseNumber);
    myRecord.('Release Number' := xReleaseNumber);
    myRecord.('Artist ID' := xArtistID);
    myRecord.('Release Artist' := xReleaseArtist);
    myRecord.(Release := xRelease);

openTable("Release", "myRecord")
end

end
 

but now nothing is working.

 

Any suggestions?

Thank You in advance

1 reply

null
    • francescostefanello
    • 8 mths ago
    • Reported - view

    Sorry I did not check that is the alert that seem to make problems.

    I deleted it and now seems to work

Content aside

  • Status Answered
  • 8 mths agoLast active
  • 1Replies
  • 50Views
  • 1 Following