Forum Replies Created
-
AuthorPosts
-
This worked like a charm exactly as you described. I just hadn’t thought about getFieldValue().
Thanks for this Alexeander, I got the edit form working with your code (code below). My vLookup field is Batches, The field I am totaling is Dried_x0020_LBs.
You were correct in that the less modern vLookup code referenced in the other article above does not work with more recent ones, I have v2.2.84.
Would you happen to know how I can use this on the new form when the “.thisItemID” isn’t known yet?
//Wait until vLookup loads function vLookupIsLoadedCallback(fin){ if(fin === "vLookupBatches"){ //Get Total Pounds from vLookup var vLookupTotal = spjs.vLookup.dataObj["vLookupBatches"][spjs.dffs.data.thisItemID].tot["Dried_x0020_LBs"]; setFieldValue('P1pounds',vLookupTotal); } }
I’ve seen this post: https://spjsblog.com/forums/topic/sum-multiple-vlookup-total-columns/, but just can’t seem to translate it into my simpler case. I just need some direction to help get going. I have the vLookup working just need to capture the total and save to list, should be simple I think. I will document this for other’s use as I think this is a strong use case.
- This reply was modified 7 years, 6 months ago by Todd Ingersoll.
- This reply was modified 7 years, 6 months ago by Todd Ingersoll.
I was able to get this to work using the classicoptions in the google reference above:
I have 3 options setup in the options tab:
series
{ "0": { "targetAxisIndex": "0" }, "1": { "type": "line" }, "2": { "targetAxisIndex": "2" } }
vAxes
{ "0": { "title": "Pounds" }, "2": { "title": "Downtime Hours" } }
seriesType
bars
- This reply was modified 7 years, 6 months ago by Todd Ingersoll.
Attachments:
This is now working. Here’s what I have for Custom JS and I call when the Cascading Dropdown is chosen:
} function convertStringToNumber(){ var val = getFieldValue("TargetP1"), fVal = ""; fVal = spjs.vLookup.formatNumber(val,{"decimals":0,"decimalSeparator":".","thousandsSeparator":","}); setFieldValue("TargetNumP1",fVal); }
Hey Alexander, would the above be possible with a vLookup? So, in your example, say the person was creating the products in the products list with a vLookup in the same form prior to adding them to the orders list (even though this is an unlikely scenario).
I got the error to go away as I noticed you referred to that function as setFieldValue (with a “ue”) in another post here. I cannot get it to display or set that field, however.
- This reply was modified 7 years, 7 months ago by Todd Ingersoll.
Thanks Alexander.
Is setFieldVal coming from somewhere else? I’m getting this error:- This reply was modified 7 years, 7 months ago by Todd Ingersoll.
Attachments:
1. I am successfully pulling in TargetP1 from a source list using the Cascading dropdown functionality. In the source list I am using a calculated column to convert a number I need to into text (because you don’t allow numbers to be used in the Cascading dropdown functionality). 2. Then I am attempting to convert the text to a number using a rule. This is where I can’t seem to find a way to display it with a thousands separator and no decimals in the New or Edit form. It displays properly in the view form (see the screenshot in my first post).
- This reply was modified 7 years, 7 months ago by Todd Ingersoll.
Attachments:
So it appears to display a number correctly when an entry exists for the column on form load. But when entering data in the edit or new form, and using a cascading dropdown for instance, it does not display correctly until the data is saved to the list.
I’m using: Dynamic Forms for SharePoint DFFS Backend v4.4.2.9|CSS version: 4.21 / |spjs-utility version: 1.279
-
AuthorPosts