Isaac Harned
Member
Forum Replies Created
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

OK, modified the code so that you can pass the field name and group in the function call, this will make it work for any dropdown that you want to grab from whichever group needed. This will need to be placed in the dropdowns up top where you are selecting the group teams. I did have to rename the field on the bottom, I think the colon in the previous name was giving me issues. Here is a couple of snapshots showing my locations and the file back with the first couple of groups loaded and set. 49rs still not working. I may have to get it to pass something different without numbers so the code knows what to do.
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

Here is a simple sample for locking a form field, but I assume you will want some kind of password system, we’ll work on that:
var field = this.getField(“fieldName”);
if (field != null) {
field.readonly = true;
}
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

Ok, you were on the right track, and I see you are using Chat GPT, which will help. Most of the issue I think was that you need to populate the actual field names instead of jsut “dropdown 1” etc. Here is the conversation I am having with chat. I have most values populating into the list, except for 49rs, which is giving me some issues. Will follow up later as well as a way to lock the fields and submit via email. more than likely can get it done:
Also, make sure that “1:” through “6:” are already built as dropdowns. The call for “populateDropdown();” should be in every “Group” dropdown as an action, I prefer on mouse blur, that way it works universally on any system including iPad, but up to you.
https://chatgpt.com/share/2b41d812-6299-49d8-a417-bd6ce87f4a5f
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

I’m don’t consider myself expert, but may be able to help
-
Isaac Harned
MemberSeptember 6, 2024 at 1:33 pm in reply to: Working with Blue Beam in One Drive / SharepointPoints: 8,848Rank: UC2 Brainery Purple Belt III
I am curious Doug, on PDF usage on sharepoint in relation to storage. You have some massive PDF’s, does your storage balloon with the versioning?
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

Played with this a little more, sorry, haven’t messed with stamps before, it should use an event callout that way it knows which file it’s looking at. Here is an example of the basic submittal approval stamp that’s built in to Revu, but modified to pull that File name. Check out the “getProjectNoFromDocName();” callout and function at the end. Let me know if this works, and if more issues, we may have to see the specific stamp file to help.
var builder =
{
// These map to Text Fields in the Stamp
textBoxes :
[
{ field: “Other – Description”, description: “Other – Description:”, default: function() { return “”; } },
{ field: “CheckedBy”, description: “Checked by:”, default: function() { return Collab.user; } },
{ field: “Date”, description: “Date:”, default: function()
{
var curDate = new Date();
return (curDate.getMonth() + 1) + “/” + curDate.getDate() + “/” + curDate.getFullYear();
}
},
{ field: “Submittal”, description: “Submittal #:”, default: function() { return event.source.source.documentFileName; } },
{ field: “Project”, description: “Project:”, default: function() { return getProjectNoFromDocName(); } }
],
// This maps to a Radio Group in the PDF named ‘Type of Submittal’
radioGroup : “Document Type”,
radioButtons :
[
// value maps to the ‘Choice’ of each radio button in the group, description will show on the dialog
{ value: “SubmittalForApproval”, description: “Submittal For Approval” },
{ value: “Resubmittal”, description: “Re-Submittal For Approval” }
],
checkBoxes :
[
{ field: “Approved” },
{ field: “Rejected” },
{ field: “Revise” },
{ field: “Not Reviewed” },
{ field: “Other” }
]
};
function getProjectNoFromDocName() {
var docName = event.source.source.documentFileName; // Access the document name correctly
return docName.slice(0, 4); // Grab the first four characters
}
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

var name = this.documentFileName;
this.getField(“fieldname“).value = name;
Alternatively if it needs to be split into multiple outputs it might look something like:
var name = this.documentFileName;
var parts = name.replace(“.pdf”, “”).split(“_”);
var projectNum = parts[0];
var projectName = parts[1];
this.getField(“ProjectNo”).value = projectNum;
this.getField(“ProjName”).value = projectName;
This of course is if you are using the same identifier to split the Number and name in the doc title, i.e. “_” in this case
Hopefully this helps, let me know if you have anything else!
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

Why not File Name?
I know this takes setting up bookmarks ahead of time, which are hardly ever correct downstream, but you could simplify the bookmarks and have Bluebeam Split the Doc by Top level, with naming dependent on the Bookmark. Obviously this would probably take more individual files, but using callouts for this kind of info (Noticed it with RFI’s too) is definitely becoming a thing.
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

The large chunk of the code will be global, under “Tools/Form/JavaScript”. Then you should place the “populateDropdown();” in the Properties/Actions of each “Group” dropdown. As far as the locking for form fields, it should be it’s own button. The locking code will need some tuning, probably a Regular expression to find all the fields that start with “Group”. GPT can help you sort that out. I haven’t been able to come back to this yet, but the print and email may be a little bit difficult with normal javascript as there is not yet a way to call out to other programs for actions like that as far as I can tell. But, if everyone is using bluebeam it can be simple to add a “Script” (different from JavaScript, these are kind of like bluebeam macros, the Script Reference doc on BB website relates specifically to these, and you can find them under “Document/Scripts”). Specifically there is a pre-built “Flatten and Print” button you can add to your toolbar that can automate this and pull up the email with attachment already created.
-
Isaac Harned
MemberSeptember 9, 2024 at 3:33 pm in reply to: Working with Blue Beam in One Drive / SharepointPoints: 8,848Rank: UC2 Brainery Purple Belt III
Copy, I am also looking into the permission capabilities of sharepoint itself to set the PDF’s to a check in check out system. Technically the permissions would have to be set per folder, but as I understand it, Power Automate can handle the heavy lifting.
-
Isaac Harned
MemberSeptember 6, 2024 at 5:08 pm in reply to: Working with Blue Beam in One Drive / SharepointPoints: 8,848Rank: UC2 Brainery Purple Belt III
Thank you, that helps alot, we are slowly transitioning, and talks have turned to moving our entire server, makes me nervous
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

No worries, I’m glad it worked out! Not to make myself look like a loser but a lot of my answers come from GPT 🤣 If you guys ever struggle with this, just ask it questions based on “Adobe PDF JavaScript”. There are a few methods that don’t work in Revu, but with a little troubleshooting and back and forth with the bot, but that usually gets me pretty close to what I need.
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

I would agree here, plenty you can do with a CSV file, but without the getAnnots method, your scripts will never even see the markups.
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

The script route would only work if they fixed the arguments for it so that it can reference specific pages. I think the defaults might be your only option, and it would be a two step manual process.
-
Points: 8,848Rank: UC2 Brainery Purple Belt III

I don’t know if it’s exactly what you need, but you can save defaults in the Header and Footer preferences. If I was making the workflow for myself, I might make one that I apply to Page 1, and another that I would apply to the rest of the pages. Again though, if it has graphics, template might be the only way.
