vidierre Posted June 9, 2021 Report Share Posted June 9, 2021 When I insert a record, I want use a fied (named ere_ I have a table representing heirs (named scn_eredi) with these fields: the scn_id referencing a records in the will table named (scn_successioni) the ere_id is a unique id used to build relation between heirs and will tables the ere_num should be a progressive number for each heir-person related to a will To fill the third field I used in webform datapage a calculated value with this formula: SELECT MAX(ere_num)+1 FROM scn_eredi a WHERE a.scn_id = "[@field:scn_id]" I tried the statement both with [@field:scn_id], '[@field:scn_id]' and "[@field:scn_id]" with the same result. It works, but it seems ignoring the WHERE statement. When I insert a second will he do not restart numbering. Quote Link to comment Share on other sites More sharing options...
I tried the statement both with [@field:scn_id], '[@field:scn_id]' and "[@field:scn_id]" with the same result.
Link to comment
Share on other sites
3 answers to this question
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.