I have a text box named "inpPromoID_frm" with View = DisplayMode and this Default property:-
"FY" & Right(
LookUp(
'Fiscal Reporting Calendar',
And(
'Beginning of Week' <= inpPromoStartDate.SelectedDate,
'End of Week' >= inpPromoStartDate.SelectedDate
),
'Fiscal Year'
),
2
) & "WK" & LookUp(
'Fiscal Reporting Calendar',
And(
'Beginning of Week' <= inpPromoStartDate.SelectedDate,
'End of Week' >= inpPromoStartDate.SelectedDate
),
Week
) & "_" & Substitute(
inpPromoName_frm.Text,
" ",
""
)
and on the form on success i have this formula:-
Set(varSpinner_frm,true);
If(
varFormMode = "New",
Set(ShowForm,false);
ForAll(
AttachArticlesControl.Attachments As FileUpload,
PRFAttachments.Run(
{
contentBytes: FileUpload.Value,
name: inpPromoID_frm.Text & "_" & FileUpload.Name
},
inpPromoID_frm.Text,
"Articles",
User().FullName,
Left(
FileUpload.Name,
Find(
".",
FileUpload.Name
) - 1
),
frmPromotionRequests.LastSubmit.ID,
Right(
FileUpload.Name,
Find(
".",
FileUpload.Name
)-2
)
)
);
ForAll(
AttachFinancialAnalysisControl.Attachments As FileUpload,
PRFAttachments.Run(
{
contentBytes: FileUpload.Value,
name: inpPromoID_frm.Text & "_" & FileUpload.Name
},
inpPromoID_frm.Text,
"Financial Analysis",
User().FullName,
Left(
FileUpload.Name,
Find(
".",
FileUpload.Name
) - 1
),
frmPromotionRequests.LastSubmit.ID,
Right(
FileUpload.Name,
Find(
".",
FileUpload.Name
)-2
)
)
);
UpdateContext({varSubmitFormTimer: false});
Reset(tmrSubmitForm);
UpdateContext({varSubmitFormTimer: true}),
Set(ShowForm,false);
ForAll(
AttachArticlesControl.Attachments As FileUpload,
PRFAttachments.Run(
{
contentBytes: FileUpload.Value,
name: inpPromoID_frm.Text & "_" & FileUpload.Name
},
inpPromoID_frm.Text,
"Articles",
User().FullName,
Left(
FileUpload.Name,
Find(
".",
FileUpload.Name
) - 1
),
LookUp(
'Promotion Requests',
'Promo ID' = varPromoID,
ID
),
Right(
FileUpload.Name,
Find(
".",
FileUpload.Name
)-2
)
)
);
ForAll(
AttachFinancialAnalysisControl.Attachments As FileUpload,
PRFAttachments.Run(
{
contentBytes: FileUpload.Value,
name: inpPromoID_frm.Text & "_" & FileUpload.Name
},
inpPromoID_frm.Text,
"Financial Analysis",
User().FullName,
Left(
FileUpload.Name,
Find(
".",
FileUpload.Name
) - 1
),
LookUp(
'Promotion Requests',
'Promo ID' = varPromoID,
ID
),
Right(
FileUpload.Name,
Find(
".",
FileUpload.Name
)-2
)
)
);
Set(varSpinner_frm,false);
Reset(AttachArticlesControl);
Reset(AttachFinancialAnalysisControl);
Navigate(scrPRFDetails)
)
but i am getting this runtime error on the above formual (the form onsuccess formula):-


now if i instead of writing this inside the Form onsuccess:-
inpPromoID_frm.Text
I copy the whole formula (the formula inside the text box Default property):-
"FY" & Right(
LookUp(
'Fiscal Reporting Calendar',
And(
'Beginning of Week' <= inpPromoStartDate.SelectedDate,
'End of Week' >= inpPromoStartDate.SelectedDate
),
'Fiscal Year'
),
2
) & "WK" & LookUp(
'Fiscal Reporting Calendar',
And(
'Beginning of Week' <= inpPromoStartDate.SelectedDate,
'End of Week' >= inpPromoStartDate.SelectedDate
),
Week
) & "_" & Substitute(
inpPromoName_frm.Text,
" ",
""
)
i will not get any error? any advice?
Thanks