Forum Replies Created
-
AuthorPosts
-
November 5, 2024 at 19:49 in reply to: Feature Request: Different ways of showing date in email #38217
Hi
I’ll add support for specifying the dateformat when selecting from the “Add dynamic content” menu in the next version, but as a workaround you can add this to your Custom JS (replace DueDate with the actual internal name of your field):var myCustomDate = ""; // Must use var an not let to make it globally available function dffs_PreSaveAction() { const date = getFieldValue("DueDate", "dateObject"); const formatter = new Intl.DateTimeFormat('en-US', { day: '2-digit', month: '2-digit', year: 'numeric' }); myCustomDate = formatter.format(date); }
Now add this variable to your email body like this:
myCustomDate: [[variable:myCustomDate]]
Alexander
You must add the CSS code to the Custom CSS tab. Where you put it now, only custom styling of the read-only fields are supposed to go (and then without the ID selector).
Alexander
You can try using this Custom JS instead of using rules to detect the change on the PP.
function peoplePickerChanged(fin){ var currPPvalue = spjs.dffs.beforeProperties[fin]; if(currPPvalue.length === 0){ console.log("The field is empty on form load"); } setInterval(() => { let val = getFieldValue(fin); let isResolved = spjs.utility.getFieldValue({"fin": fin, "key": "isresolved"}); if(!isResolved.includes(false) && String(currPPvalue) !== String(val)){ currPPvalue = val; console.log("Changed to", val); if(val.length === 0){ console.log("Is empty"); } } },1000); } peoplePickerChanged("PeoplePicker1");
Alexander
I need to see a screenshot of the “Prefill values in child” section in your vLookup config. Also make sure the field names are correct and that there is actually a value in the “From” field.
Alexander
That will unfortunately not work because the suffix after the class is generated new on every page load. If you want to keep the reload button and only want to hide the label you can change it like this:
#vLookup_empty_7419064349689197 > div > div { display:none; }
I’ll add a separate ID to the label in the next version so you can address it by ID directly.
Alexander
Hi,
Are you using a rule triggering on form load or on field change?It can be done using custom js so If you can give me some more details I can give you a code example.
Alexander
Hi,
I’ll fix the change field issue in the next versionThe other issue can be achieved by setting the number of items to fetch to 0 and then use custom css to hide the “No items match the query” message.
Get the ID to the vLookup in the vLookup configuration (bottom of first tab) and change it like this (adding “empty_”) and add it to custom css:
#vLookup_empty_7419064349689197{ display:none; }
I have included a fix for this issue in the new v1.0.71.0 – see change log here – Let me know how it works out.
Alexander
I did one change in v1.0.67.0, but I’ll look into it again and se if I can get a fix into the next upcoming release. I plan to release it over the weekend.
Alexander
Hi,
Which version of Modern DFFS are you running?Alexander
I thought all issues were resolved, but when I do a test now it seems the DFFS banner button only shows when you reload the page and not when you navigate using the left side menu (quick launch) between lists.
In my case, the command-set extension is still active and working, but the DFFS banner button is not showing unless you reload the page.
I’ll investigate, but in the meantime can you check if there are any errors in the developer console (F12 > Console) when you load the page, and if the banner button shows if you reload the page?
You can email me any screenshots if you like.
Alexander
Thanks for your donation.
You can set the width for example in percent using the “Style” textarea of the field setup in the vLookup config. For example like this:
width:20%
I’m not able to recreate the decimal issue on number fields. Have you specified the number of decimals in the list settings in the list you are pulling the values from?
Regarding the styling: There are unlimited possibilities so it’s hard for me to think of what could be useful. Can you give me some examples of what you think of here? – no-wrap on the field label, or when you use side-by-side with multiple fields?
Best regards,
AlexanderI’m guessing this must be a caching issue in your browser. Try clearing the cache either in the developer tools or in the browser settings.
Alexander
Sorry, I thought I had replied, but cannot find my reply anywhere.
I’m not able to recreate the issue with setting a PP and using it in an email as recipient – if you can email me or post some screenshots so I can see exactly how you have it set up I can try to replicate it.
I have added new triggers that will fix the second question by adding a trigger “is changed from initial value” – combine two triggers like this:
AND
— Field is equal to Yes
— Field is changed from initial valueI’ll try to get it published later this weekend or early next week.
Alexander
Add a new email using the button shown in the attached image.
Regarding the other issue: I cannot find my reply – something must have failed when I posted it. I’ll reply again in the other topic.
Alexander
Attachments:
-
AuthorPosts