If(
IsBlank('EasyFLY Form'.LastSubmit); // Check if the form is new (blank record)
EasyTravelFlow.Run( // If new, create a new record
Nome.Text;
Dipartimento.Text;
Tipologia.Text;
Text(DateAdd(Data1.SelectedDate; 0; TimeUnit.Hours); "yyyy-mm-dd");
Ora1.Selected.Value;
Minuto1.Selected.Value;
AeroportoPartenza.Selected.Value;
VoloPartenza.Text;
Text(DateAdd(Data2.SelectedDate; 0; TimeUnit.Hours); "yyyy-mm-dd");
Ora2.Selected.Value;
Minuto2.Selected.Value;
AeroportoRientro.Selected.Value;
VoloRientro.Text;
Value(Costo.Text);
Value(Int.Text);
Round.Selected.Value
);;
);;
// After submission, reset fields and close the popup
Set(varButtonPressed; true)& // Change the button state (to indicate press)
Set(varTimerRunning; true)& // Start the timer to reset the effect
If(varButtonPressed; RGBA(0; 255; 0; 1); RGBA(255; 255; 255; 1))& // Green when pressed, Neutral when idle
Set(varButtonScale; If(varButtonPressed; 1,2; 1))& // Increase size by 20% when pressed, 100% when idle
Set(varButtonTransparency; If(varButtonPressed; 0,8; 1))& // Make the button slightly transparent when pressed
ResetForm('EasyFLY Form')&
NewForm('EasyFLY Form')&
Set(varShowPopup; false) // Close the popup after submission
Sixth set of errors comes from the formula in the Onselect of the cancel button:
Set(varButtonPressed; RGBA(0;100;0;1))&
// After submission, reset fields and close the popup
Set(varButtonPressed; true)& // Change the button state (to indicate press)
Set(varTimerRunning; true)&
// Start the timer to reset the effect
Set(varButtonScale; If(varButtonPressed; 1,2; 1))& // Increase size by 20% when pressed, 100% when idle
Set(varButtonTransparency; If(varButtonPressed; 0,8; 1))& // Make the button slightly transparent when pressed
ResetForm('EasyFLY Form')&
NewForm('EasyFLY Form')&
Set(varShowPopup; false) // Close the popup after submission
I get an error on: RGBA(0;100;0;1))
The error message I receive: "Incompatible type. The formula cannot be evaluated because the context variable types are incompatible with the value types in other parts of the app."
I get an error on: Set(varButtonPressed; true) same thing with (true)
The error message I receive: "Incompatible type. The formula cannot be evaluated because the context variable types are incompatible with the value types in other parts of the app."
I get an error on: If(varButtonPressed and If(varButtonPressed
The error message I receive: "Invalid argument type (Error). A Boolean value is expected."
Seventh set of errors comes from the OnTimerEnd of the timer:
Set(varButtonPressed; false)& // Reset the button appearance after the timer ends
Set(varTimerRunning; false) // Stop the timer
I only get an error on the (false) of: Set(varButtonPressed; false)
The error message I receive: "Incompatible type. The formula cannot be evaluated because the context variable types are incompatible with the value types in other parts of the app."
*Ps. The popup screen does not show up after clicking a button called "Add". Thus the record of the form never gets saved onto sharepoint, because none of the elements of the popup screen are visible.
I have included the following formula inside the department field to auto populate it based on the name inserted in the name field, but it doesn't work:
Switch(
Nome.Text;
"Name of person"; "Sporting";
"Name of person"; "Org";
"Name of person"; "Org.";
"Name of person"; "Org.";
"Name of person"; "Sporting";
....
....
"" // Default value if no match
)
I have included the following formula inside the office type field to auto populate it based on the name inserted in the name field, but it doesn't work:
Switch(
Nome.Text;
"Name of person"; "PT";
"Name of person"; "ST";
"Name of person"; "ST";
"Name of person"; "PT";
....
....
"" // Default value if no match
)
This post is long I know, but all of these formulas have been inserted and written correctly according to chat GPT. Is there anyone that could help me out? Thank You!