Forum Replies Created
-
AuthorPosts
-
This has been added to the latest BETA: https://files.spjsworks.com/?dir=files%2FvLookupForSharePoint%2FSP2010+and+SP2013%2FBETA%2F
Alexander
I’m glad you figured it out.
Alexander
Sorry, this is single choice only.
Alexander
Hi,
I have confirmed this bug. It appears when you have duplicate entries for the current form in the configuration list.I cannot tell exactly why you end up with duplicates, but I will add a check for it in the upcoming release so it will not affect the solution if you somehow manage to get duplicates.
If someone have a clue as to why you end up with duplicates, please let me know.
For now, you must manually remove the duplicate entry in the configuration list by going to /Lists/SPJSDynamicFormsForSharePoint/AllItems.aspx and deleting the oldest configuration for the affected form (look at the “Modified” date).
Alexander
I’m glad you figured it out.
AlexanderI’m not sure this is a good idea. The scripts will load for ALL pages, and not just the forms. This will make the page load slower as it has to query the DFFS config list to see if it finds any records.
You can try it, but it is not “officially” recommended.
Alexander
Sorry, my bad – there was an error in the code example. See if this helps.
Alexander
Hi,
This is no problem. Add this code to the header (see image attached):PM Number: <span id="putPMNumberHere" />
Then use this code in the custom JS section in the Misc tab:
// For DispForm $("#putPMNumberHere").html(getFieldValue("YourFieldName",true)); // For EditForm $("#putPMNumberHere").html(getFieldValue("YourFieldName",false));
PS: “YourFieldName” is the FieldInternalName – change it for your actual field name.
Hope this helps
Alexander- This reply was modified 9 years, 11 months ago by Alexander Bautz. Reason: Fixed error in code example
Attachments:
I’m glad you figured it out!
Alexander
Hi,
I’m not aware of this issue. I have a few questions:- Is this the new BETA, or is it v4.200?
- Can you give me some details on browser, SharePoint version etc?
- Does it happen for all forms, or only some?
- Any errors in the developer console (hit F12 > Console)?
Alexander
Hi David,
Thank you for testing. I have a few quesions.
1: What kind of field is “Volume (Last 12 Months) and what trigger did you use to set it read only?2: Did the field “English Approval – Writer” have a value that did not show up when set to read only? If so, what trigger did you use to set it read only?
3: Regarding boolean fields in DispForm – are you 100% sure you used the new version in the frontend?
Info regarding comparing dates: This change will use the full date including hours and minutes when comparing date values from two different fields – using one date col in the “If this trigger” field, and another date col in “This value” field – doing a compare using less than or greater than.
Alexander
Thank you for the feedback.
Alexander
I’m glad you figured it out.
Alexander
Hi,
Add this code to your Custom JS section:$("#dffs_POType select, #dffs_NumberPOLines select").change(function(){ showFieldsByPOType(); }); function showFieldsByPOType(){ var arr, a, b, ticker = 1; // Hide all while(ticker <= 10){ $("#sbs_OuterTR_"+ticker).hide(); ticker +=1; } ticker = 1; a = $("#dffs_PODetails select").val(); b = $("#dffs_NumberOfPOLines select").val(); if(a !== "" && b !== ""){ while(ticker <= b){ $("#sbs_OuterTR_"+ticker).show(); if(a === "Service"){ $("#sbs_Field_GLAccount"+ticker).hide(); $("#sbs_Field_WBSSAPCode"+ticker).hide(); $("#sbs_Field_CostCenter"+ticker).hide(); }else{ $("#sbs_Field_GLAccount"+ticker).show(); $("#sbs_Field_WBSSAPCode"+ticker).show(); $("#sbs_Field_CostCenter"+ticker).show(); } ticker +=1; } } }
You must verify that “POType”, “NumberPOLines” are the correct names. Also check that “GLAccount”, “WBSSAPCode” and “CostCenter” are the right *prefix* for your fields as the script appends 1-10.
In the tab where you have the PO lines, your side-by-side index must be from 1-10 for the side-by-side groups of fields as the code hides the entire line and not the individual fields.
You must also add “showFieldsByPOType” as “Click function name” for the tab where you display the PO lines.
PS: When using F12 to debug the code it will take a long time to render. This speeds up a lot if you close the developer console.
Hope this helps you on the way, and let me know if something is unclear.
AlexanderIt looks like you have a bit much going on here. This is a scenario where you would be better off creating a custom function that triggers on the change event on the trigger fields. If you can describe the basic logic you are trying to make, I can make a code example you can use as a starting point.
Alexander
-
AuthorPosts