Forum Replies Created
-
AuthorPosts
-
March 16, 2018 at 13:04 in reply to: Possible enhancement to DFFS handling of fields in rules – any thoughts? #20258
Christoph Moosbrugger
ParticipantHi,
this would be of great help as I am struggling now with having a tab visible only if multiple fields are field. So far I can only get it to run that it is visible if one field is filled.
thanks.
ChristophChristoph Moosbrugger
ParticipantHi Alexander,
following code i see:
The total value of the line items above is stored in the code as following:
<td class="vLookupTotals vLookup_total_vlookupItems" valign="top">VALUE< /td>
The Value of the line item is stored in the code as following:
td class="childTableCell vLookupItems_Net_x0020_Value" valign="top" style="width:100px,max-width:100px;">
My custom JS code is following which is implemented in the New Item FOrm and in the Edit Item Form:
function dffs_PreSaveAction(){ setFieldValue("NET_x0020_Value",spjs.vLookup.dataObj.vLookupItems[spjs.dffs.data.thisItemID].tot.NET_x0020_Value); return true }
maybe you also need to know the Field NET_x0020_Value is in the Parent List and in the Cild List available. In the Parent List it is just a text field and in the childlist it is a calculated field where it calculates the product of amount and price per unit.
Let me know if you need further details.
thanks.
Christoph-
This reply was modified 5 years, 8 months ago by
Christoph Moosbrugger.
Christoph Moosbrugger
ParticipantHi,
I think I know what you mean but this still does not solve the issue.
This works with the initial code snippet you gave me but also this is kind of not the solution we are looking for. Would be a workaround.
christoph
Christoph Moosbrugger
ParticipantHi Alexander,
this addition to the code still does not resolve the issue. Following is the error from the console:
SCRIPT5007: Unable to get property ‘tot’ of undefined or null reference
thanks.
ChristophChristoph Moosbrugger
ParticipantHi Alexander,
even with new new code snippet I still cannot save the form. The issue seems to be with the New Form and the code snippet. When I have the code in the NewForm Custom JS section it will not allow me to save.
When i delete it from the Newform and just use it in the edit form, it will work when I reenter the form, add the lines and then it will transfer the numbers correctly but this is not how it should work.
Any solution for this that the numbers get copied already with the newform?
thanks.
ChristophChristoph Moosbrugger
ParticipantHi Alexander,
I tried to use your second code snippet but now I have the problem it will not let me save the form.
function dffs_PreSaveAction({
setFieldValue(“test123”,spjs.vLookup.dataObj.vLookupTasks[spjs.dffs.data.thisItemID].tot.PercentCompleted);
}and I think you miss a closing bracket in the code. can that be?
thanks.
ChristophChristoph Moosbrugger
ParticipantHi Alexander,
is there also a way to define when the script is executed? I guess by default it is executed on load, right? Is there any chance to run this little script on save? so when I click on save?
thanks.
Christoph Moosbrugger
ParticipantHi Alexander,
I guess the issue with the totals row has to do with the missing code after seconds. Attached you can see two screenshots taken one after the other (see the time in the right bottom corner). the interesting part is the time when the code got save. there is one hour difference but the screenshot with no code was taken later.
thanks.
ChristophAttachments:
Christoph Moosbrugger
ParticipantHi Alexander,
I just ran into another issue. When I put the code into the JS section of the EditForm everything works well beside the issue in my previous post but today in the morning i recognized that the code is gone.
thanks.
ChristophChristoph Moosbrugger
ParticipantHi Alexander,
that works so far. The only issue I found is when there is only one item in the lookup. This returns no value in the totals field and therefore the test123 field stays empty.
Is there a work around so also one item returns a totals value?
thanks.
Christoph Moosbrugger
ParticipantHi,
I got it fixed. It had to do with the retention policy you can set. If a retention policy is active you cannot delete apps or sites (depending on the settings).
thanks.
Christoph Moosbrugger
ParticipantHI Alexander,
we are on sharepoint online, not on premises.
yes, i tried already to find anything in this regards on google but mainly solutions for on premises and nothing for sharepoint online.
I am happy for any advice :).
Christoph Moosbrugger
ParticipantHi,
I am now running into the issue that I cannot delete the APP anymore. I get an error “Sorry, we couldn’t remove the app. Click to retry.”
any help on this?
thanks.
Christoph Moosbrugger
ParticipantHi Alexander,
i checked the version of the CSS uploaded and it was the newest. Nevertheless I uploaded all files again, cleared cache and it did work.
Maybe my fault with the cache or a typical IT issue 🙂
thanks.
Christoph Moosbrugger
ParticipantI do not know if there is a connection to this but when checking the code i see this error in the console:
jquery.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery.js:4 -
This reply was modified 5 years, 8 months ago by
-
AuthorPosts