Skip to main content

#Dynamic0 debatiendo

Hello,

 

I'm trying to do some forecasting that goes beyond Tableau's built in forecasting capabilities but running into some problems. When I apply this formula (bold is the important part):

 

SCRIPT_STR("library(forecast);

predict_data <- .arg1;

log_ts <- ts(log(predict_data),frequency=52);

diff_ts=diff(log_ts); ⌗make data stationary

length=length(diff_ts)-1;

predict_data2=diff_ts[1:length]; ⌗ignore latest y count

regressors=data.frame(summer=.arg2[2:(length+1)],fall=.arg3[2:(length+1)], winter=.arg4[2:(length+1)], nwd=.arg5[2:(length+1)]); # get explanatory variable data

xreg=cbind(summer=model.matrix(~as.factor(regressors$summer)),fall=regressors$fall, winter=regressors$winter, nwd=regressors$nwd); ⌗make matrix of explanatory variables

xreg=xreg[,-1]; ⌗exclude intercept

modArima=auto.arima(predict_data2,xreg=xreg); ⌗dynamic regression model

 

season=strsplit(.arg6, ",")[[1]]; ⌗create vector of dummy variables from [Season] string season.num=as.numeric(season); ⌗convery dummy variables to numeric x=append(season.num, min(.arg7); ⌗append dummy variables with [# of NWD] for prediction vector

 

mat=matrix(x,nrow=1); ⌗xreg requires matrix

fcast=forecast(modArima,xreg=mat,h=1);

paste(predict_data[(length-1)]exp(fcast$lower)[1,1],predict_data[(length-1)]exp(fcast$upper)[1,1],sep='~') ⌗transform back and grab 80 PI", sum([y]),sum([Summer]),sum([Fall]),sum([Winter]),sum([NWD]),[Season],[# of NWD])

 

I get this error:

Error in base::parse(text = .cmd) : <text>:12:0:unexpected end of input

10: modArima=auto.arima(predict_data2,xreg=xreg); ⌗dynamic regression model

11: season=strsplit(.arg6,

^

 

[Season] is a string parameter that can take on the value of "0,0,0" "0,1,0" "1,0,0" or "0,0,1". What is weird to me is that when I try out the bolded part of the script in R, I have no issues at all.

 

Anyone know what could be causing the problem in Tableau? Thanks!

 

Sorry I can not post a workbook as the data is private.

3 respuestas
0/9000
Kj Azu ha preguntado en #Generate Document

 The Standard Object "Contract" has a field "FileName_c". 

I want to set the file name(Contract.FileName_c) to be saved in "Save as" when a PDF is created.

I found some solution from this site and salesforce.stackexchange.com. But I cannot resolve.

What code enter to my Vis

 

#PDF #PDFs #Visualforce Pages #Generate Document #Dynamic #Sales Cloudualforce Page and Apex Class? My codes are below.

///Visualforce Page///

<apex:page renderAs="pdf" applyhtmltag="false" showheader="false" standardController="Contract" extensions="ContractController">

/ my main code is here /

<head>

<style>

 

///Apex Class///

 public class ContractController{       // my main code is here //

    private final Contract contract;     public Contract tokuyaku {get;set;}     public String tokParts{get;set;}     public String tokTime{get;set;}     public String Remarks{get;set;}     public String season{get;set;}     public String tokuSp{get;set;}          public ContractController(ApexPages.StandardController stdController){         this.contract = (contract)stdController.getRecord(); 

3 respuestas
0/9000

Query on Dynamic Forms...we are using these to provide a better UX for data capture.  And we are finding that if field values are changed that hide fields that have previously been completed, these previous values are not being reset/blanked.

For example:

Field 'Do you have an Offer' = Yes/No

If Yes, see field 'Offer Type' and user selects from pick list of Offer 1, Offer 2, Offer 3.  Component visibility used on Offer Type field to only show when Do you have an Offer = Yes.

If User makes a selection in 'Offer Type', then subsequently changes the field 'Do you have an Offer' from Yes to No, the field 'Offer Type' is no longer visible (as expected) but the selected value in the field remains.

 

We have a workaround to fix this and reset the values, but just wondered if this was a known limitation or we are missing something?

Any insight much appreciated!

 

#CRM Configuration

 

@* Sales Cloud - Best Practices * @* Sales Cloud - Getting Started * @* Service Cloud *

4 respuestas
  1. 8 oct 2021, 8:01

    Hi @Ajaypreet Singh Saini, thanks for your reply.  The visibility is as you have set it out, however, we are not using checkboxes, we are using single select pick lists.  Do the values only clear for checkboxes?

     

    @Eduard Kunoff - thanks, we are using a process builder to clear the fields at the moment...just hoped we'd missed something and this wasn't needed!

     

    Thank you both

    Elle

0/9000

In our org, we implemented dynamic forms on a custom object and there is a path setup on that object.

When user is trying to change the status using the path, they are not able to change it.

Can anybody help me with this?

 

#dynamic forms #Sales Cloud #Salesforce Admin

5 respuestas
  1. Tom Bassett (Vera Solutions) Forum Ambassador
    5 jul 2021, 13:02

    Just to check does the user have Field Level Security/ access to update the status field.

    Is 'Hide Complete Button' enabled on the path component?

    The status will need to be added to the old school Page Layout assigned to the Record Type and Profile I believe.

    If that still doesn't work try to also add it to the Lightning Page in a field section.

0/9000

Pardot target prospects older than 30.  How do you segment prospects over 30ish based on birth year inside Pardot?

0/9000