Skip to main content
Nintex Community Menu Bar
Question

how to avoid to users to updating the file extension?

  • July 10, 2024
  • 1 reply
  • 0 views
  • Translate

Forum|alt.badge.img+1

I am very new to skuid.
I have following requirement. If possible anyone could help me to do this. I need  snippet code and how to render that actually.

1.Run Snippet:   The snippet should do the following:
   a)Compare the old file extension in the file name (i.e. the characters that come after the last period (.) in the file name, if the filename has any periods in it) with the file extension of the new file name.
   b)If they are not equal, return false; which will trigger the OnError action step, else return true;
2.Add an OnError action to the Run Snippet step:
   a)Show Popup. The popup should have the following text “If you change a file name extension, the file might become unstable. Are you sure you want to change it?” followed by two buttons “Yes, Change It” and “No, Revert Back”.
      1)If the user clicks “Yes, Change It”, then simply close this top pop-up
      2)If the user clicks “No, Revert Back”, then revert the file name field back to its prior value and close this top pop-up (this will probably require another small JavaScript snippet)



Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Forum|alt.badge.img+9
  • Nintex Employee
  • 890 replies
  • July 10, 2024

Hi Prapoorna, this may be possible without using any script. The Action Framework in Skuid has grown to be very powerful, and it will be beneficial for you to learn about it even if you don’t end up using it for your needs. Whether you use scripting or not though, I think the solution will take some work.

You’ll definitely want to read about the file upload component and experiment with which fields are available for attachments. Extension may be available in Salesforce as its own field, if I remember correctly.

Step 2 could fire off a Model action that generates a popup whenever a condition is set to true. The condition could watch the file name field, and you may be able to use the “ends with” operator to compare text. 

In the popup, you would use a rich text field or a template to display the warning text, and a button set with the two choices (yes/no). Each button would fire off a different set of actions, depending on how things should be resolved. 

I hope this summary and the links provided will help you consider how you might approach building this tool. I would recommend trying to tackle one step at a time and link the elements together once you’ve gotten them pretty well built.

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings