Hi,
Please could someone advise if it possible to prevent an app formula and or an InitialValue firing when a row is copied?
I have a VC app formula called max_branch_number that looks for the MAX โbranch numberโ in three columns of the survey table:
MAX(
survey[branch_number]+
survey[branch_A_number]+
survey[branch_B_number]
)
The survey form has two app formulas that say [max_branch_number]+n to give me the next available branch number:
IF(
[branch_A_decision] = โYesโ,
([max_branch_number]+1),[branch_A_number]
)
IF(
[branch_B_decision] = โYesโ,
([max_branch_number]+2),[branch_B_number]
)
An on-form-save action then creates n copies of the form.
Each time the row is copied, the formula fires again and the numbers change.
Iโd like just the values to show in the copied rows so that they have the same โbranch numberโ as the โparentโ row.
The final twist is that, while rows are being added, the parent row calculations are correct. After the last row is created the action visits the first row again and the formula fires once more and I end up with changed numbers!
Is my issue related to how Iโm creating my additional rows?
Grouped action for on-form-save
Action for first row:
Action for last row:
Thanks in advance for any pointersโฆ
Cheersโฆ
Solved! Go to Solution.
You could add an extra column for auto generated rows and add an if condition based on that column to prevent the formula from firing.
Bummer. Do you need to manually create new rows or could you perhaps make this an exclusive auto generated table?
Hi @Bellave_Jayaramโฆ Thanks for coming inโฆ Iโm not familiar with auto generated tablesโฆ Iโll look them upโฆ Donโt need to create rows manuallyโฆ Just need them created ASAP after form saveโฆ
This sounds interestingโฆ Please could you elaborate a littleโฆ?
You could add an extra column for auto generated rows and add an if condition based on that column to prevent the formula from firing.
Hi @Bellave_Jayaram,
Thank you very much for that suggestion! Works beautifully!
Hereโs what I did:
IF(
[do_not_fire] = โStopโ,[max_branch_number]-1,
IF(
[branch_A_decision] = โYesโ,
([max_branch_number]+1),[branch_A_number]
))
IF(
[do_not_fire] = โStopโ,[max_branch_number],
IF(
[branch_B_decision] = โYesโ,
([max_branch_number]+2),[branch_B_number]
))
Thanks for nudging me in that directionโฆ
- always glad to know oneโs suggestion worked. You have a very cool app you are working on, btw.
Thank youโฆ Itโs been a very interesting project and AppSheet and the community seem to have an answer for every challenge Iโve come up against so far! Iโm very impressed! Cheersโฆ
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |